# 1-basic # Let's start simple... U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => @com.facebook.post(); A: What do you want to post? A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_slot_fill ( status ) ; @com.facebook ( id = GENERIC_ENTITY_tt:device_id_0 ) . post ( ) ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.facebook-6","display":"Some Device 6"}} A: >> expecting = raw_string U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => @com.facebook.post(status="hello world"); A: Ok, do you want me to post hello world on Facebook? A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_confirm_action ; @com.facebook ( id = GENERIC_ENTITY_tt:device_id_0 ) . post ( status = QUOTED_STRING_0 ) ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.facebook-6","display":"Some Device 6"},"QUOTED_STRING_0":"hello world"} A: >> expecting = yesno U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => @com.facebook.post(status="hello world") #[confirm=enum(confirmed)]; A: I posted hello world on Facebook. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_action_success ; @com.facebook ( id = GENERIC_ENTITY_tt:device_id_0 ) . post ( status = QUOTED_STRING_0 ) #[ results = [ { status = QUOTED_STRING_0 , __device = GENERIC_ENTITY_tt:device_id_0 } ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.facebook-6","display":"Some Device 6"},"QUOTED_STRING_0":"hello world"} A: >> expecting = null ==== # 2-basic-with-raw-string # Actually typing things... U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => @com.facebook.post(); A: What do you want to post? A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_slot_fill ( status ) ; @com.facebook ( id = GENERIC_ENTITY_tt:device_id_0 ) . post ( ) ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.facebook-6","display":"Some Device 6"}} A: >> expecting = raw_string U: hello world A: Ok, do you want me to post hello world on Facebook? A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_confirm_action ; @com.facebook ( id = GENERIC_ENTITY_tt:device_id_0 ) . post ( status = QUOTED_STRING_0 ) ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.facebook-6","display":"Some Device 6"},"QUOTED_STRING_0":"hello world"} A: >> expecting = yesno U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => @com.facebook.post(status="hello world") #[confirm=enum(confirmed)]; A: I posted hello world on Facebook. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_action_success ; @com.facebook ( id = GENERIC_ENTITY_tt:device_id_0 ) . post ( status = QUOTED_STRING_0 ) #[ results = [ { status = QUOTED_STRING_0 , __device = GENERIC_ENTITY_tt:device_id_0 } ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.facebook-6","display":"Some Device 6"},"QUOTED_STRING_0":"hello world"} A: >> expecting = null ==== # 2-twitter # posting on twitter U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => @com.twitter.post(); A: You have multiple Twitter devices. Which one do you want to use? A: choice 0: Twitter Account foo A: choice 1: Twitter Account bar A: >> context = $dialogue @org.thingpedia.dialogue.transaction . execute ; @com.twitter . post ( ) ; // {} A: >> expecting = choice U: \t $choice(0); A: What do you want to tweet? A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_slot_fill ( status ) ; @com.twitter ( id = GENERIC_ENTITY_tt:device_id_0 ) . post ( ) ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"twitter-foo","display":"Twitter Account foo"}} A: >> expecting = raw_string U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => @com.twitter(id="twitter-foo",name="Twitter Account foo").post(status="hello world"); A: Ok, do you want me to tweet hello world? A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_confirm_action ; @com.twitter ( id = GENERIC_ENTITY_tt:device_id_0 ) . post ( status = QUOTED_STRING_0 ) ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"twitter-foo","display":"Twitter Account foo"},"QUOTED_STRING_0":"hello world"} A: >> expecting = yesno U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => @com.twitter(id="twitter-foo",name="Twitter Account foo").post(status="hello world") #[confirm=enum(confirmed)]; A: I tweeted hello world. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_action_success ; @com.twitter ( id = GENERIC_ENTITY_tt:device_id_0 ) . post ( status = QUOTED_STRING_0 ) #[ results = [ { status = QUOTED_STRING_0 , __device = GENERIC_ENTITY_tt:device_id_0 } ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"twitter-foo","display":"Twitter Account foo"},"QUOTED_STRING_0":"hello world"} A: >> expecting = null ==== # 3-yelp # simple yelp search U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => @com.yelp.restaurant() => notify; A: I see Ramen Nagi, Evvia Estiatorio, and Oren's Hummus. Ramen Nagi is rated 4.5 star, Evvia Estiatorio is rated 4.5 star, and Oren's Hummus is rated 4 star. A: rdl: Ramen Nagi https://www.yelp.com/biz/ramen-nagi-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg A: rdl: Evvia Estiatorio https://www.yelp.com/biz/evvia-estiatorio-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg A: rdl: Oren's Hummus https://www.yelp.com/biz/orens-hummus-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_three ; @com.yelp . restaurant ( ) #[ results = [ { id = GENERIC_ENTITY_com.yelp:restaurant_0 , image_url = PICTURE_0 , link = URL_0 , cuisines = [ GENERIC_ENTITY_com.yelp:restaurant_cuisine_0 , GENERIC_ENTITY_com.yelp:restaurant_cuisine_1 ] , price = enum moderate , rating = NUMBER_0 , reviewCount = NUMBER_1 , geo = LOCATION_0 } ] ] #[ count = NUMBER_2 ] #[ more = true ] ; // {"GENERIC_ENTITY_com.yelp:restaurant_0":{"value":"vhfPni9pci29SEHrN1OtRg","display":"Ramen Nagi"},"PICTURE_0":"https://s3-media3.fl.yelpcdn.com/bphoto/OKCXWIEFIkNdvkqETl0Bqw/o.jpg","URL_0":"https://www.yelp.com/biz/ramen-nagi-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg","GENERIC_ENTITY_com.yelp:restaurant_cuisine_0":{"value":"ramen","display":"Ramen"},"GENERIC_ENTITY_com.yelp:restaurant_cuisine_1":{"value":"noodles","display":"Noodles"},"NUMBER_0":4.5,"NUMBER_1":1625,"LOCATION_0":{"latitude":37.445523,"longitude":-122.1607073261,"display":null},"NUMBER_2":50} A: >> expecting = null # U: What price range is Ramen Nagi ? U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => [price] of @com.yelp.restaurant(), id == "vhfPni9pci29SEHrN1OtRg"^^com.yelp:restaurant => notify; A: Ramen Nagi is a moderate restaurant. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_one ; [ price ] of @com.yelp . restaurant ( ) filter id == GENERIC_ENTITY_com.yelp:restaurant_0 #[ results = [ { id = GENERIC_ENTITY_com.yelp:restaurant_0 , price = enum moderate } ] ] ; // {"GENERIC_ENTITY_com.yelp:restaurant_0":{"value":"vhfPni9pci29SEHrN1OtRg","display":null}} A: >> expecting = null # U: No, I'm looking for something expensive. U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => @com.yelp.restaurant(), price == enum(expensive) => notify; A: I see Evvia Estiatorio, NOLA Restaurant & Bar, and Tamarine Restaurant. Evvia Estiatorio is near [Latitude: 37.445 deg, Longitude: -122.164 deg], NOLA Restaurant & Bar is near [Latitude: 37.445 deg, Longitude: -122.161 deg], and Tamarine Restaurant is near [Latitude: 37.449 deg, Longitude: -122.158 deg]. A: rdl: Evvia Estiatorio https://www.yelp.com/biz/evvia-estiatorio-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg A: rdl: NOLA Restaurant & Bar https://www.yelp.com/biz/nola-restaurant-and-bar-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg A: rdl: Tamarine Restaurant https://www.yelp.com/biz/tamarine-restaurant-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_three ; @com.yelp . restaurant ( ) filter price == enum expensive #[ results = [ { id = GENERIC_ENTITY_com.yelp:restaurant_0 , image_url = PICTURE_0 , link = URL_0 , cuisines = [ GENERIC_ENTITY_com.yelp:restaurant_cuisine_0 ] , price = enum expensive , rating = NUMBER_0 , reviewCount = NUMBER_1 , geo = LOCATION_0 , phone = PHONE_NUMBER_0 } ] ] #[ count = 10 ] ; // {"GENERIC_ENTITY_com.yelp:restaurant_0":{"value":"1vMgajRAI3lYwuCeGX58oQ","display":"Evvia Estiatorio"},"PICTURE_0":"https://s3-media3.fl.yelpcdn.com/bphoto/Q3lgbcNuRbdrITtLN5CQgQ/o.jpg","URL_0":"https://www.yelp.com/biz/evvia-estiatorio-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg","GENERIC_ENTITY_com.yelp:restaurant_cuisine_0":{"value":"greek","display":"Greek"},"NUMBER_0":4.5,"NUMBER_1":2393,"LOCATION_0":{"latitude":37.445077,"longitude":-122.163778,"display":null},"PHONE_NUMBER_0":"+16503260983"} A: >> expecting = null # U: Thanks, this is sufficient. U: \t $dialogue @org.thingpedia.dialogue.transaction.cancel; #A: Is there anything else I can help you with? #A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_anything_else ; @com.yelp . restaurant ( ) filter price == enum expensive #[ results = [ { id = GENERIC_ENTITY_com.yelp:restaurant_0 , image_url = PICTURE_0 , link = URL_0 , cuisines = [ GENERIC_ENTITY_com.yelp:restaurant_cuisine_0 ] , price = enum expensive , rating = NUMBER_0 , reviewCount = NUMBER_1 , geo = LOCATION_0 , phone = PHONE_NUMBER_0 } ] ] #[ count = 10 ] ; // {"GENERIC_ENTITY_com.yelp:restaurant_0":{"value":"1vMgajRAI3lYwuCeGX58oQ","display":"Evvia Estiatorio"},"PICTURE_0":"https://s3-media3.fl.yelpcdn.com/bphoto/Q3lgbcNuRbdrITtLN5CQgQ/o.jpg","URL_0":"https://www.yelp.com/biz/evvia-estiatorio-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg","GENERIC_ENTITY_com.yelp:restaurant_cuisine_0":{"value":"greek","display":"Greek"},"NUMBER_0":4.5,"NUMBER_1":2393,"LOCATION_0":{"latitude":37.445077,"longitude":-122.163778,"display":null},"PHONE_NUMBER_0":"+16503260983"} #A: >> expecting = generic # U: No thanks, goodbye #U: \t $dialogue @org.thingpedia.dialogue.transaction.end; A: Alright, let me know if I can help you with anything else! A: >> context = null // {} A: >> expecting = null ==== # 4-weather # getting the weather U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => @org.thingpedia.weather.current(location=new Location(37.442156, -122.1634471, "Palo Alto, California")) => notify; A: The current weather in Palo Alto, California is sunny. The temperature is 60 degrees Fahrenheit and the humidity is 91.3 %. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_display_result ; @org.thingpedia.weather . current ( location = LOCATION_0 ) #[ results = [ { location = LOCATION_0 , temperature = MEASURE_C_0 , wind_speed = MEASURE_mps_0 , humidity = NUMBER_0 , cloudiness = NUMBER_1 , fog = 0 , status = enum sunny , icon = PICTURE_0 } ] ] ; // {"LOCATION_0":{"latitude":37.442156,"longitude":-122.1634471,"display":"Palo Alto, California"},"MEASURE_C_0":{"unit":"C","value":15.6},"MEASURE_mps_0":{"unit":"mps","value":3.4},"NUMBER_0":91.3,"NUMBER_1":4.7,"PICTURE_0":"http://api.met.no/weatherapi/weathericon/1.1/?symbol=1;content_type=image/png"} A: >> expecting = null # what's the temperature? U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => [temperature] of @org.thingpedia.weather.current(location=new Location(37.442156, -122.1634471, "Palo Alto, California")) => notify; A: The temperature is 60 degrees Fahrenheit. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_display_result ; [ temperature ] of @org.thingpedia.weather . current ( location = LOCATION_0 ) #[ results = [ { location = LOCATION_0 , temperature = MEASURE_C_0 , status = enum sunny } ] ] ; // {"LOCATION_0":{"latitude":37.442156,"longitude":-122.1634471,"display":"Palo Alto, California"},"MEASURE_C_0":{"unit":"C","value":15.6}} A: >> expecting = null ==== # 5-weather-slot-fill # getting the weather again U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => @org.thingpedia.weather.current(location=$?) => notify; A: What location do you want the current weather for? A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_slot_fill ( location ) ; @org.thingpedia.weather . current ( location = $? ) ; // {} A: >> expecting = location # let's use the location picker! U: \t bookkeeping(answer(new Location(37.442156, -122.1634471, "Palo Alto, California"))); A: The current weather in Palo Alto, California is sunny. The temperature is 60 degrees Fahrenheit and the humidity is 91.3 %. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_display_result ; @org.thingpedia.weather . current ( location = LOCATION_0 ) #[ results = [ { location = LOCATION_0 , temperature = MEASURE_C_0 , wind_speed = MEASURE_mps_0 , humidity = NUMBER_0 , cloudiness = NUMBER_1 , fog = 0 , status = enum sunny , icon = PICTURE_0 } ] ] ; // {"LOCATION_0":{"latitude":37.442156,"longitude":-122.1634471,"display":"Palo Alto, California"},"MEASURE_C_0":{"unit":"C","value":15.6},"MEASURE_mps_0":{"unit":"mps","value":3.4},"NUMBER_0":91.3,"NUMBER_1":4.7,"PICTURE_0":"http://api.met.no/weatherapi/weathericon/1.1/?symbol=1;content_type=image/png"} A: >> expecting = null ==== # 6-spotify # simple-spotify-search U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => (@com.spotify.song(), id =~ ("despacito")) => @com.spotify.play(playable=id); A: I played Despacito on Spotify. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_action_success ; ( @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . song ( ) filter id =~ QUOTED_STRING_0 ) [ 1 ] => @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . play ( playable = id ) #[ results = [ { playable = GENERIC_ENTITY_com.spotify:playable_0 , device = GENERIC_ENTITY_com.spotify:device_0 , __device = GENERIC_ENTITY_tt:device_id_0 } ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.spotify-7","display":"Some Device 7"},"QUOTED_STRING_0":"despacito","GENERIC_ENTITY_com.spotify:playable_0":{"value":"spotify:track:6habFhsOp2NvshLv26DqMb","display":"Despacito"},"GENERIC_ENTITY_com.spotify:device_0":{"value":"str:ENTITY_com.spotify:device::36:","display":null}} A: >> expecting = null ==== # 7-spotify # spotify-search-artist U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => (@com.spotify.song(), contains(artists, null^^com.spotify:artist("ariana grande"))) => @com.spotify.play(playable=id); A: I played songs by Ariana Grande on Spotify. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_action_success ; @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . song ( ) filter contains ( artists , GENERIC_ENTITY_com.spotify:artist_0 ) => @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . play ( playable = id ) #[ results = [ { playable = GENERIC_ENTITY_com.spotify:playable_0 , device = GENERIC_ENTITY_com.spotify:device_0 , __device = GENERIC_ENTITY_tt:device_id_0 } ] ] #[ count = NUMBER_0 ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.spotify-7","display":"Some Device 7"},"GENERIC_ENTITY_com.spotify:artist_0":{"value":"spotify:artist:66CXWjxzNUsdJxJ2JdwvnR","display":"Ariana Grande"},"GENERIC_ENTITY_com.spotify:playable_0":{"value":"spotify:track:6ocbgoVGwYJhOv1GgI9NsF","display":"7 rings"},"GENERIC_ENTITY_com.spotify:device_0":{"value":"str:ENTITY_com.spotify:device::36:","display":null},"NUMBER_0":23} A: >> expecting = null ==== # 8-spotify # spotify-search-album U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => (@com.spotify.song(), album == null^^com.spotify:album("folklore")) => @com.spotify.play(playable=id); A: I played songs in the album folklore on Spotify. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_action_success ; @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . song ( ) filter album == GENERIC_ENTITY_com.spotify:album_0 => @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . play ( playable = id ) #[ results = [ { playable = GENERIC_ENTITY_com.spotify:playable_0 , device = GENERIC_ENTITY_com.spotify:device_0 , __device = GENERIC_ENTITY_tt:device_id_0 } ] ] #[ count = NUMBER_0 ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.spotify-7","display":"Some Device 7"},"GENERIC_ENTITY_com.spotify:album_0":{"value":"spotify:album:2fenSS68JI1h4Fo296JfGr","display":"folklore"},"GENERIC_ENTITY_com.spotify:playable_0":{"value":"spotify:track:4R2kfaDFhslZEMJqAFNpdd","display":"cardigan"},"GENERIC_ENTITY_com.spotify:device_0":{"value":"str:ENTITY_com.spotify:device::36:","display":null},"NUMBER_0":22} A: >> expecting = null ==== # 9-joke # tell me a joke U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => @com.icanhazdadjoke.get() => notify; A: What do you call a troublesome Canadian high schooler? A poutine. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_display_result ; @com.icanhazdadjoke ( id = GENERIC_ENTITY_tt:device_id_0 ) . get ( ) #[ results = [ { id = GENERIC_ENTITY_com.icanhazdadjoke:id_0 , text = QUOTED_STRING_0 } ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.icanhazdadjoke-8","display":"Some Device 8"},"GENERIC_ENTITY_com.icanhazdadjoke:id_0":{"value":"A5ozsH6pWnb","display":null},"QUOTED_STRING_0":"What do you call a troublesome Canadian high schooler? A poutine"} A: >> expecting = null # another one U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => @com.icanhazdadjoke.get() => notify; A: Why are fish so smart? Because they live in schools! A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_display_result ; @com.icanhazdadjoke ( id = GENERIC_ENTITY_tt:device_id_0 ) . get ( ) #[ results = [ { id = GENERIC_ENTITY_com.icanhazdadjoke:id_0 , text = QUOTED_STRING_0 } ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.icanhazdadjoke-8","display":"Some Device 8"},"GENERIC_ENTITY_com.icanhazdadjoke:id_0":{"value":"lGe2Tvskyd","display":null},"QUOTED_STRING_0":"Why are fish so smart?\nBecause they live in schools!"} A: >> expecting = null # another one U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => @com.icanhazdadjoke.get() => notify; A: What is a witch's favorite subject in school? Spelling! A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_display_result ; @com.icanhazdadjoke ( id = GENERIC_ENTITY_tt:device_id_0 ) . get ( ) #[ results = [ { id = GENERIC_ENTITY_com.icanhazdadjoke:id_0 , text = QUOTED_STRING_0 } ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.icanhazdadjoke-8","display":"Some Device 8"},"GENERIC_ENTITY_com.icanhazdadjoke:id_0":{"value":"K6UKmykqrjb","display":null},"QUOTED_STRING_0":"What is a witch's favorite subject in school? Spelling! "} A: >> expecting = null # another one U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => @com.icanhazdadjoke.get() => notify; A: What is a witch's favorite subject in school? Spelling! A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_display_result ; @com.icanhazdadjoke ( id = GENERIC_ENTITY_tt:device_id_0 ) . get ( ) #[ results = [ { id = GENERIC_ENTITY_com.icanhazdadjoke:id_0 , text = QUOTED_STRING_0 } ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.icanhazdadjoke-8","display":"Some Device 8"},"GENERIC_ENTITY_com.icanhazdadjoke:id_0":{"value":"K6UKmykqrjb","display":null},"QUOTED_STRING_0":"What is a witch's favorite subject in school? Spelling! "} A: >> expecting = null ==== # 10-cancel U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => @com.twitter.post(); A: You have multiple Twitter devices. Which one do you want to use? A: choice 0: Twitter Account foo A: choice 1: Twitter Account bar A: >> context = $dialogue @org.thingpedia.dialogue.transaction . execute ; @com.twitter . post ( ) ; // {} A: >> expecting = choice U: \r $choice ( 1 ) ; A: What do you want to tweet? A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_slot_fill ( status ) ; @com.twitter ( id = GENERIC_ENTITY_tt:device_id_0 ) . post ( ) ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"twitter-bar","display":"Twitter Account bar"}} A: >> expecting = raw_string U: \r bookkeeping special special:nevermind A: Alright, let me know if I can help you with anything else! A: >> context = null // {} A: >> expecting = null ==== # 11-entity-linking U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => @com.yelp.restaurant(), contains(cuisines, null^^com.yelp:restaurant_cuisine("italian")) => notify; A: I see Patxi's Pizza, Cafe Borrone, and Osteria Toscana. They're moderate restaurants with Italian food. A: rdl: Patxi's Pizza https://www.yelp.com/biz/patxis-pizza-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg A: rdl: Cafe Borrone https://www.yelp.com/biz/cafe-borrone-menlo-park?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg A: rdl: Osteria Toscana https://www.yelp.com/biz/osteria-toscana-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_three ; @com.yelp . restaurant ( ) filter contains ( cuisines , GENERIC_ENTITY_com.yelp:restaurant_cuisine_0 ) #[ results = [ { id = GENERIC_ENTITY_com.yelp:restaurant_0 , image_url = PICTURE_0 , link = URL_0 , cuisines = [ GENERIC_ENTITY_com.yelp:restaurant_cuisine_1 , GENERIC_ENTITY_com.yelp:restaurant_cuisine_2 , GENERIC_ENTITY_com.yelp:restaurant_cuisine_0 ] , price = enum moderate , rating = NUMBER_0 , reviewCount = NUMBER_1 , geo = LOCATION_0 , phone = PHONE_NUMBER_0 } ] ] #[ count = 5 ] ; // {"GENERIC_ENTITY_com.yelp:restaurant_cuisine_0":{"value":"italian","display":"Italian"},"GENERIC_ENTITY_com.yelp:restaurant_0":{"value":"OLa29RISTT2raUNPLo-9xw","display":"Patxi's Pizza"},"PICTURE_0":"https://s3-media3.fl.yelpcdn.com/bphoto/Jvow48SJ-SfCcxLt0a7uWg/o.jpg","URL_0":"https://www.yelp.com/biz/patxis-pizza-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg","GENERIC_ENTITY_com.yelp:restaurant_cuisine_1":{"value":"pizza","display":"Pizza"},"GENERIC_ENTITY_com.yelp:restaurant_cuisine_2":{"value":"salad","display":"Salad"},"NUMBER_0":3.5,"NUMBER_1":1700,"LOCATION_0":{"latitude":37.445153,"longitude":-122.163337,"display":null},"PHONE_NUMBER_0":"+16504739999"} A: >> expecting = null ==== # 12-invalid-entity U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => @com.yelp.restaurant(), contains(cuisines, null^^com.yelp:restaurant_cuisine("invalid")) => notify; #A: Sorry, I cannot find any Yelp Cuisine matching “invalid”. A: >> context = null // {} A: >> expecting = null ==== # 13-invalid-command U: !! test command always failed !! A: Sorry, I did not understand that. Can you rephrase it? A: >> context = null // {} A: >> expecting = null ==== # 14-terminate-conversation U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => @com.yelp.restaurant(), contains(cuisines, null^^com.yelp:restaurant_cuisine("italian")) => notify; A: I see Patxi's Pizza, Cafe Borrone, and Osteria Toscana. They're moderate restaurants with Italian food. A: rdl: Patxi's Pizza https://www.yelp.com/biz/patxis-pizza-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg A: rdl: Cafe Borrone https://www.yelp.com/biz/cafe-borrone-menlo-park?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg A: rdl: Osteria Toscana https://www.yelp.com/biz/osteria-toscana-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_three ; @com.yelp . restaurant ( ) filter contains ( cuisines , GENERIC_ENTITY_com.yelp:restaurant_cuisine_0 ) #[ results = [ { id = GENERIC_ENTITY_com.yelp:restaurant_0 , image_url = PICTURE_0 , link = URL_0 , cuisines = [ GENERIC_ENTITY_com.yelp:restaurant_cuisine_1 , GENERIC_ENTITY_com.yelp:restaurant_cuisine_2 , GENERIC_ENTITY_com.yelp:restaurant_cuisine_0 ] , price = enum moderate , rating = NUMBER_0 , reviewCount = NUMBER_1 , geo = LOCATION_0 , phone = PHONE_NUMBER_0 } ] ] #[ count = 5 ] ; // {"GENERIC_ENTITY_com.yelp:restaurant_cuisine_0":{"value":"italian","display":"Italian"},"GENERIC_ENTITY_com.yelp:restaurant_0":{"value":"OLa29RISTT2raUNPLo-9xw","display":"Patxi's Pizza"},"PICTURE_0":"https://s3-media3.fl.yelpcdn.com/bphoto/Jvow48SJ-SfCcxLt0a7uWg/o.jpg","URL_0":"https://www.yelp.com/biz/patxis-pizza-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg","GENERIC_ENTITY_com.yelp:restaurant_cuisine_1":{"value":"pizza","display":"Pizza"},"GENERIC_ENTITY_com.yelp:restaurant_cuisine_2":{"value":"salad","display":"Salad"},"NUMBER_0":3.5,"NUMBER_1":1700,"LOCATION_0":{"latitude":37.445153,"longitude":-122.163337,"display":null},"PHONE_NUMBER_0":"+16504739999"} A: >> expecting = null U: \t $dialogue @org.thingpedia.dialogue.transaction.cancel; #A: Is there anything else I can help you with? #A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_anything_else ; @com.yelp . restaurant ( ) filter contains ( cuisines , GENERIC_ENTITY_com.yelp:restaurant_cuisine_0 ) #[ results = [ { id = GENERIC_ENTITY_com.yelp:restaurant_0 , image_url = PICTURE_0 , link = URL_0 , cuisines = [ GENERIC_ENTITY_com.yelp:restaurant_cuisine_1 , GENERIC_ENTITY_com.yelp:restaurant_cuisine_2 , GENERIC_ENTITY_com.yelp:restaurant_cuisine_0 ] , price = enum moderate , rating = NUMBER_0 , reviewCount = NUMBER_1 , geo = LOCATION_0 , phone = PHONE_NUMBER_0 } ] ] #[ count = 5 ] ; // {"GENERIC_ENTITY_com.yelp:restaurant_cuisine_0":{"value":"italian","display":"Italian"},"GENERIC_ENTITY_com.yelp:restaurant_0":{"value":"OLa29RISTT2raUNPLo-9xw","display":"Patxi's Pizza"},"PICTURE_0":"https://s3-media3.fl.yelpcdn.com/bphoto/Jvow48SJ-SfCcxLt0a7uWg/o.jpg","URL_0":"https://www.yelp.com/biz/patxis-pizza-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg","GENERIC_ENTITY_com.yelp:restaurant_cuisine_1":{"value":"pizza","display":"Pizza"},"GENERIC_ENTITY_com.yelp:restaurant_cuisine_2":{"value":"salad","display":"Salad"},"NUMBER_0":3.5,"NUMBER_1":1700,"LOCATION_0":{"latitude":37.445153,"longitude":-122.163337,"display":null},"PHONE_NUMBER_0":"+16504739999"} #A: >> expecting = generic # "no thanks", but intercepted by the exact match #U: \r bookkeeping special special:no A: Alright, let me know if I can help you with anything else! A: >> context = null // {} A: >> expecting = null ==== # 15-action-success-phrase # repeat this song U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => @com.spotify.player_repeat(repeat=enum(track)); A: I set the repeat state for you to track. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_action_success ; @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . player_repeat ( repeat = enum track ) #[ results = [ { repeat = enum track , __device = GENERIC_ENTITY_tt:device_id_0 } ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.spotify-7","display":"Some Device 7"}} A: >> expecting = null ==== # 16-empty-search U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => @com.yelp.restaurant(), contains(cuisines, "peruvian"^^com.yelp:restaurant_cuisine("Peruvian")) => notify; A: Sorry, there are no restaurants matching your request. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_empty_search ; @com.yelp . restaurant ( ) filter contains ( cuisines , GENERIC_ENTITY_com.yelp:restaurant_cuisine_0 ) #[ results = [ ] ] ; // {"GENERIC_ENTITY_com.yelp:restaurant_cuisine_0":{"value":"peruvian","display":"Peruvian"}} A: >> expecting = null ==== # 17-empty-action-result U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => @com.spotify.song(), contains(artists, "invalid"^^com.spotify:artist("Invalid")) => @com.spotify.play(playable=id); A: Sorry, there are no songs matching your request. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_empty_search ; @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . song ( ) filter contains ( artists , GENERIC_ENTITY_com.spotify:artist_0 ) => @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . play ( playable = id ) #[ results = [ ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.spotify-7","display":"Some Device 7"},"GENERIC_ENTITY_com.spotify:artist_0":{"value":"invalid","display":"Invalid"}} A: >> expecting = null ==== # 18-agent-phrase-with-my U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => @com.spotify.player_shuffle(shuffle=enum(on)); A: I turned shuffle on. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_action_success ; @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . player_shuffle ( shuffle = enum on ) #[ results = [ { shuffle = enum on , __device = GENERIC_ENTITY_tt:device_id_0 } ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.spotify-7","display":"Some Device 7"}} A: >> expecting = null ==== # 19-aggregation-count-basic U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => count(@com.yelp.restaurant()) => notify; A: There are 60 restaurants like that. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_display_result ; count ( @com.yelp . restaurant ( ) ) #[ results = [ { count = NUMBER_0 } ] ] ; // {"NUMBER_0":60} A: >> expecting = null ==== # 20-aggregation-count-filter U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => count(@com.yelp.restaurant(), contains(cuisines, "italian"^^com.yelp:restaurant_cuisine("Italian"))) => notify; A: There are 5 restaurants like that. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_display_result ; count ( @com.yelp . restaurant ( ) filter contains ( cuisines , GENERIC_ENTITY_com.yelp:restaurant_cuisine_0 ) ) #[ results = [ { count = 5 } ] ] ; // {"GENERIC_ENTITY_com.yelp:restaurant_cuisine_0":{"value":"italian","display":"Italian"}} A: >> expecting = null ==== # 21-aggregation-min U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => min(rating of (@com.yelp.restaurant())) => notify; A: The minimum rating is 3.5. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_display_result ; min ( rating of @com.yelp . restaurant ( ) ) #[ results = [ { rating = NUMBER_0 } ] ] ; // {"NUMBER_0":3.5} A: >> expecting = null ==== # 22-aggregation-avg U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => avg(rating of (@com.yelp.restaurant())) => notify; A: The average rating is 4.1. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_display_result ; avg ( rating of @com.yelp . restaurant ( ) ) #[ results = [ { rating = NUMBER_0 } ] ] ; // {"NUMBER_0":4.058333333333334} A: >> expecting = null ==== # 23-distance-question U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => [distance(geo, $location.current_location)] of (@com.yelp.restaurant()) => notify; A: The distance is 1.3 miles. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_one ; [ distance ( geo , LOCATION_0 ) ] of @com.yelp . restaurant ( ) #[ results = [ { id = GENERIC_ENTITY_com.yelp:restaurant_0 , distance = MEASURE_m_0 } ] ] #[ count = NUMBER_0 ] #[ more = true ] ; // {"LOCATION_0":{"latitude":37.4275,"longitude":-122.1697,"display":null},"GENERIC_ENTITY_com.yelp:restaurant_0":{"value":"vhfPni9pci29SEHrN1OtRg","display":"Ramen Nagi"},"MEASURE_m_0":{"unit":"m","value":2155.6170081160226},"NUMBER_0":50} A: >> expecting = null ==== # 24-error-500 U: !! test command error 500 !! A: Sorry, there seems to be a problem with the Genie service at the moment. Please try again later. A: >> context = null // {} A: >> expecting = null ==== # 25-yesno-yelp-1 U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => (@com.yelp.restaurant(), id =~ "ramen nagi") => notify; A: Ramen Nagi is a moderate restaurant rated 4.5 star. A: rdl: Ramen Nagi https://www.yelp.com/biz/ramen-nagi-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_one ; @com.yelp . restaurant ( ) filter id =~ QUOTED_STRING_0 #[ results = [ { id = GENERIC_ENTITY_com.yelp:restaurant_0 , image_url = PICTURE_0 , link = URL_0 , cuisines = [ GENERIC_ENTITY_com.yelp:restaurant_cuisine_0 , GENERIC_ENTITY_com.yelp:restaurant_cuisine_1 ] , price = enum moderate , rating = NUMBER_0 , reviewCount = NUMBER_1 , geo = LOCATION_0 } ] ] ; // {"QUOTED_STRING_0":"ramen nagi","GENERIC_ENTITY_com.yelp:restaurant_0":{"value":"vhfPni9pci29SEHrN1OtRg","display":"Ramen Nagi"},"PICTURE_0":"https://s3-media3.fl.yelpcdn.com/bphoto/OKCXWIEFIkNdvkqETl0Bqw/o.jpg","URL_0":"https://www.yelp.com/biz/ramen-nagi-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg","GENERIC_ENTITY_com.yelp:restaurant_cuisine_0":{"value":"ramen","display":"Ramen"},"GENERIC_ENTITY_com.yelp:restaurant_cuisine_1":{"value":"noodles","display":"Noodles"},"NUMBER_0":4.5,"NUMBER_1":1625,"LOCATION_0":{"latitude":37.445523,"longitude":-122.1607073261,"display":null}} A: >> expecting = null # yes please U: \r bookkeeping special special:yes A: What would you like to know? A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_learn_more_what ; @com.yelp . restaurant ( ) filter id =~ QUOTED_STRING_0 #[ results = [ { id = GENERIC_ENTITY_com.yelp:restaurant_0 , image_url = PICTURE_0 , link = URL_0 , cuisines = [ GENERIC_ENTITY_com.yelp:restaurant_cuisine_0 , GENERIC_ENTITY_com.yelp:restaurant_cuisine_1 ] , price = enum moderate , rating = NUMBER_0 , reviewCount = NUMBER_1 , geo = LOCATION_0 } ] ] ; // {"QUOTED_STRING_0":"ramen nagi","GENERIC_ENTITY_com.yelp:restaurant_0":{"value":"vhfPni9pci29SEHrN1OtRg","display":"Ramen Nagi"},"PICTURE_0":"https://s3-media3.fl.yelpcdn.com/bphoto/OKCXWIEFIkNdvkqETl0Bqw/o.jpg","URL_0":"https://www.yelp.com/biz/ramen-nagi-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg","GENERIC_ENTITY_com.yelp:restaurant_cuisine_0":{"value":"ramen","display":"Ramen"},"GENERIC_ENTITY_com.yelp:restaurant_cuisine_1":{"value":"noodles","display":"Noodles"},"NUMBER_0":4.5,"NUMBER_1":1625,"LOCATION_0":{"latitude":37.445523,"longitude":-122.1607073261,"display":null}} A: >> expecting = generic ==== # 26-yesno-yelp-2 U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => (@com.yelp.restaurant(), id =~ "ramen nagi") => notify; A: Ramen Nagi is a moderate restaurant rated 4.5 star. A: rdl: Ramen Nagi https://www.yelp.com/biz/ramen-nagi-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_one ; @com.yelp . restaurant ( ) filter id =~ QUOTED_STRING_0 #[ results = [ { id = GENERIC_ENTITY_com.yelp:restaurant_0 , image_url = PICTURE_0 , link = URL_0 , cuisines = [ GENERIC_ENTITY_com.yelp:restaurant_cuisine_0 , GENERIC_ENTITY_com.yelp:restaurant_cuisine_1 ] , price = enum moderate , rating = NUMBER_0 , reviewCount = NUMBER_1 , geo = LOCATION_0 } ] ] ; // {"QUOTED_STRING_0":"ramen nagi","GENERIC_ENTITY_com.yelp:restaurant_0":{"value":"vhfPni9pci29SEHrN1OtRg","display":"Ramen Nagi"},"PICTURE_0":"https://s3-media3.fl.yelpcdn.com/bphoto/OKCXWIEFIkNdvkqETl0Bqw/o.jpg","URL_0":"https://www.yelp.com/biz/ramen-nagi-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg","GENERIC_ENTITY_com.yelp:restaurant_cuisine_0":{"value":"ramen","display":"Ramen"},"GENERIC_ENTITY_com.yelp:restaurant_cuisine_1":{"value":"noodles","display":"Noodles"},"NUMBER_0":4.5,"NUMBER_1":1625,"LOCATION_0":{"latitude":37.445523,"longitude":-122.1607073261,"display":null}} A: >> expecting = null # no thanks U: \r bookkeeping special special:no #A: Is there anything else I can help you with? #A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_anything_else ; @com.yelp . restaurant ( ) filter id =~ QUOTED_STRING_0 #[ results = [ { id = GENERIC_ENTITY_com.yelp:restaurant_0 , image_url = PICTURE_0 , link = URL_0 , cuisines = [ GENERIC_ENTITY_com.yelp:restaurant_cuisine_0 , GENERIC_ENTITY_com.yelp:restaurant_cuisine_1 ] , price = enum moderate , rating = NUMBER_0 , reviewCount = NUMBER_1 , geo = LOCATION_0 } ] ] ; // {"QUOTED_STRING_0":"ramen nagi","GENERIC_ENTITY_com.yelp:restaurant_0":{"value":"vhfPni9pci29SEHrN1OtRg","display":"Ramen Nagi"},"PICTURE_0":"https://s3-media3.fl.yelpcdn.com/bphoto/OKCXWIEFIkNdvkqETl0Bqw/o.jpg","URL_0":"https://www.yelp.com/biz/ramen-nagi-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg","GENERIC_ENTITY_com.yelp:restaurant_cuisine_0":{"value":"ramen","display":"Ramen"},"GENERIC_ENTITY_com.yelp:restaurant_cuisine_1":{"value":"noodles","display":"Noodles"},"NUMBER_0":4.5,"NUMBER_1":1625,"LOCATION_0":{"latitude":37.445523,"longitude":-122.1607073261,"display":null}} #A: >> expecting = generic # no thanks #U: \r bookkeeping special special:no A: Alright, let me know if I can help you with anything else! A: >> context = null // {} A: >> expecting = null ==== # 27-yesno-spotify-1 U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => (@com.spotify.playable(), id =~ "Nice For What") => notify; A: Nice For What is a music by Drake released in June 28, 2018. Would you like to play it on Spotify? A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_one ; @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . playable ( ) filter id =~ QUOTED_STRING_0 #[ results = [ { id = GENERIC_ENTITY_com.spotify:playable_0 , artists = [ GENERIC_ENTITY_com.spotify:artist_0 ] , genres = [ QUOTED_STRING_1 , QUOTED_STRING_2 , QUOTED_STRING_3 ] , release_date = DATE_0 , popularity = NUMBER_0 } ] ] ; @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . play ( playable = GENERIC_ENTITY_com.spotify:playable_0 ) #[ confirm = enum proposed ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.spotify-7","display":"Some Device 7"},"QUOTED_STRING_0":"Nice For What","GENERIC_ENTITY_com.spotify:playable_0":{"value":"spotify:track:3CA9pLiwRIGtUBiMjbZmRw","display":"Nice For What"},"GENERIC_ENTITY_com.spotify:artist_0":{"value":"spotify:artist:3TVXtAsR1Inumwj472S9r4","display":"Drake"},"QUOTED_STRING_1":"canadian hip hop","QUOTED_STRING_2":"canadian pop","QUOTED_STRING_3":"hip hop","DATE_0":"2018-06-29T00:00:00.000Z","NUMBER_0":79} A: >> expecting = yesno # yes please U: \r bookkeeping special special:yes A: I played Nice For What on Spotify. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_action_success ; @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . playable ( ) filter id =~ QUOTED_STRING_0 #[ results = [ { id = GENERIC_ENTITY_com.spotify:playable_0 , artists = [ GENERIC_ENTITY_com.spotify:artist_0 ] , genres = [ QUOTED_STRING_1 , QUOTED_STRING_2 , QUOTED_STRING_3 ] , release_date = DATE_0 , popularity = NUMBER_0 } ] ] ; @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . play ( playable = GENERIC_ENTITY_com.spotify:playable_0 ) #[ results = [ { playable = GENERIC_ENTITY_com.spotify:playable_0 , device = GENERIC_ENTITY_com.spotify:device_0 , __device = GENERIC_ENTITY_tt:device_id_0 } ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.spotify-7","display":"Some Device 7"},"QUOTED_STRING_0":"Nice For What","GENERIC_ENTITY_com.spotify:playable_0":{"value":"spotify:track:3CA9pLiwRIGtUBiMjbZmRw","display":"Nice For What"},"GENERIC_ENTITY_com.spotify:artist_0":{"value":"spotify:artist:3TVXtAsR1Inumwj472S9r4","display":"Drake"},"QUOTED_STRING_1":"canadian hip hop","QUOTED_STRING_2":"canadian pop","QUOTED_STRING_3":"hip hop","DATE_0":"2018-06-29T00:00:00.000Z","NUMBER_0":79,"GENERIC_ENTITY_com.spotify:device_0":{"value":"str:ENTITY_com.spotify:device::36:","display":null}} A: >> expecting = null ==== # 28-yesno-spotify-2 U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => (@com.spotify.playable(), id =~ "Nice For What") => notify; A: Nice For What is a music by Drake released in June 28, 2018. Would you like to play it on Spotify? A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_one ; @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . playable ( ) filter id =~ QUOTED_STRING_0 #[ results = [ { id = GENERIC_ENTITY_com.spotify:playable_0 , artists = [ GENERIC_ENTITY_com.spotify:artist_0 ] , genres = [ QUOTED_STRING_1 , QUOTED_STRING_2 , QUOTED_STRING_3 ] , release_date = DATE_0 , popularity = NUMBER_0 } ] ] ; @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . play ( playable = GENERIC_ENTITY_com.spotify:playable_0 ) #[ confirm = enum proposed ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.spotify-7","display":"Some Device 7"},"QUOTED_STRING_0":"Nice For What","GENERIC_ENTITY_com.spotify:playable_0":{"value":"spotify:track:3CA9pLiwRIGtUBiMjbZmRw","display":"Nice For What"},"GENERIC_ENTITY_com.spotify:artist_0":{"value":"spotify:artist:3TVXtAsR1Inumwj472S9r4","display":"Drake"},"QUOTED_STRING_1":"canadian hip hop","QUOTED_STRING_2":"canadian pop","QUOTED_STRING_3":"hip hop","DATE_0":"2018-06-29T00:00:00.000Z","NUMBER_0":79} A: >> expecting = yesno # no thanks U: \r bookkeeping special special:no #A: Is there anything else I can help you with? #A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_anything_else ; @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . song ( ) filter id =~ QUOTED_STRING_0 #[ results = [ { id = GENERIC_ENTITY_com.spotify:song_0 , artists = [ GENERIC_ENTITY_com.spotify:artist_0 ] , album = GENERIC_ENTITY_com.spotify:album_0 , genres = [ QUOTED_STRING_1 , QUOTED_STRING_2 , QUOTED_STRING_3 ] , release_date = DATE_0 , popularity = NUMBER_0 , energy = NUMBER_1 , danceability = NUMBER_2 } ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.spotify-7","display":"Some Device 7"},"QUOTED_STRING_0":"Nice For What","GENERIC_ENTITY_com.spotify:song_0":{"value":"spotify:track:3CA9pLiwRIGtUBiMjbZmRw","display":"Nice For What"},"GENERIC_ENTITY_com.spotify:artist_0":{"value":"spotify:artist:3TVXtAsR1Inumwj472S9r4","display":"Drake"},"GENERIC_ENTITY_com.spotify:album_0":{"value":"spotify:album:1ATL5GLyefJaxhQzSPVrLX","display":"Scorpion"},"QUOTED_STRING_1":"canadian hip hop","QUOTED_STRING_2":"canadian pop","QUOTED_STRING_3":"hip hop","DATE_0":"2018-06-29T00:00:00.000Z","NUMBER_0":79,"NUMBER_1":90,"NUMBER_2":58} #A: >> expecting = generic # no thanks #U: \r bookkeeping special special:no A: Alright, let me know if I can help you with anything else! A: >> context = null // {} A: >> expecting = null ==== # 29-expected-spotify-error U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => @com.spotify.play(playable="spotify:track:4sPmO7WMQUAf45kwMOtONw"^^com.spotify:playable("Hello")); A: Sorry, you must open the Spotify app first. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_action_error ; @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . play ( playable = GENERIC_ENTITY_com.spotify:playable_0 ) #[ results = [ ] ] #[ error = enum no_active_device ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.spotify-7","display":"Some Device 7"},"GENERIC_ENTITY_com.spotify:playable_0":{"value":"spotify:track:4sPmO7WMQUAf45kwMOtONw","display":"Hello"}} A: >> expecting = null ==== # 30-unexpected-spotify-error U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => @com.spotify.play(playable="spotify:track:2zYzyRzz6pRmhPzyfMEC8s"^^com.spotify:playable("Hello")); A: Sorry, there was an unexpected error with your command. Please try again later or report this issue to my developers. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_action_error ; @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . play ( playable = GENERIC_ENTITY_com.spotify:playable_0 ) #[ results = [ ] ] #[ error = enum E_some_other_error ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.spotify-7","display":"Some Device 7"},"GENERIC_ENTITY_com.spotify:playable_0":{"value":"spotify:track:2zYzyRzz6pRmhPzyfMEC8s","display":"Hello"}} A: >> expecting = null ==== # 31-displaying-dates U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => [release_date] of (@com.spotify.song(), id =~ "Nice For What") => notify; A: Nice For What is a song with the date equal to June 28, 2018. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_one ; [ release_date ] of @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . song ( ) filter id =~ QUOTED_STRING_0 #[ results = [ { id = GENERIC_ENTITY_com.spotify:song_0 , release_date = DATE_0 } ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.spotify-7","display":"Some Device 7"},"QUOTED_STRING_0":"Nice For What","GENERIC_ENTITY_com.spotify:song_0":{"value":"spotify:track:3CA9pLiwRIGtUBiMjbZmRw","display":"Nice For What"},"DATE_0":"2018-06-29T00:00:00.000Z"} A: >> expecting = null ==== # 32-projection-must-be-shown # issue #338 U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => [release_date] of (@com.spotify.song(), id =~ "hello") => notify; A: Hello? Is released in May 24, 2018. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_one ; [ release_date ] of @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . song ( ) filter id =~ QUOTED_STRING_0 #[ results = [ { id = GENERIC_ENTITY_com.spotify:song_0 , release_date = DATE_0 } ] ] #[ count = 11 ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.spotify-7","display":"Some Device 7"},"QUOTED_STRING_0":"hello","GENERIC_ENTITY_com.spotify:song_0":{"value":"spotify:track:7qwt4xUIqQWCu1DJf96g2k","display":"Hello?"},"DATE_0":"2018-05-25T00:00:00.000Z"} A: >> expecting = null ==== # 33-top-k-must-not-be-single # issue #339 U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => (sort popularity desc of @com.spotify.song())[1:3] => notify; A: I see ROCKSTAR (feat. Roddy Ricch), Blinding Lights, and death bed (coffee for your head). ROCKSTAR (feat. Roddy Ricch) is by DaBaby, Blinding Lights is by The Weeknd, and death bed (coffee for your head) is by Powfu. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_three ; sort ( popularity desc of @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . song ( ) ) [ 1 : 3 ] #[ results = [ { id = GENERIC_ENTITY_com.spotify:song_0 , artists = [ GENERIC_ENTITY_com.spotify:artist_0 , GENERIC_ENTITY_com.spotify:artist_1 ] , album = GENERIC_ENTITY_com.spotify:album_0 , genres = [ QUOTED_STRING_0 , QUOTED_STRING_1 ] , release_date = DATE_0 , popularity = NUMBER_0 , energy = NUMBER_1 , danceability = NUMBER_2 } ] ] #[ count = 3 ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.spotify-7","display":"Some Device 7"},"GENERIC_ENTITY_com.spotify:song_0":{"value":"spotify:track:7ytR5pFWmSjzHJIeQkgog4","display":"ROCKSTAR (feat. Roddy Ricch)"},"GENERIC_ENTITY_com.spotify:artist_0":{"value":"spotify:artist:4r63FhuTkUYltbVAg5TQnk","display":"DaBaby"},"GENERIC_ENTITY_com.spotify:artist_1":{"value":"spotify:artist:757aE44tKEUQEqRuT6GnEB","display":"Roddy Ricch"},"GENERIC_ENTITY_com.spotify:album_0":{"value":"spotify:album:623PL2MBg50Br5dLXC9E9e","display":"BLAME IT ON BABY"},"QUOTED_STRING_0":"north carolina hip hop","QUOTED_STRING_1":"rap","DATE_0":"2020-04-17T00:00:00.000Z","NUMBER_0":100,"NUMBER_1":69,"NUMBER_2":74} A: >> expecting = null ==== # 34-search-album # what is the release date of the album the wall U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => [release_date] of (@com.spotify.album(), id =~ "the wall") => notify; A: The Wall is released in November 29, 1979. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_one ; [ release_date ] of @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . album ( ) filter id =~ QUOTED_STRING_0 #[ results = [ { id = GENERIC_ENTITY_com.spotify:album_0 , release_date = DATE_0 } ] ] #[ count = 4 ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.spotify-7","display":"Some Device 7"},"QUOTED_STRING_0":"the wall","GENERIC_ENTITY_com.spotify:album_0":{"value":"spotify:album:5Dbax7G8SWrP9xyzkOvy2F","display":"The Wall"},"DATE_0":"1979-11-30T00:00:00.000Z"} A: >> expecting = null ==== # 35-change-of-topic U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => [release_date] of (@com.spotify.album(), id =~ "the wall") => notify; A: The Wall is released in November 29, 1979. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_one ; [ release_date ] of @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . album ( ) filter id =~ QUOTED_STRING_0 #[ results = [ { id = GENERIC_ENTITY_com.spotify:album_0 , release_date = DATE_0 } ] ] #[ count = 4 ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.spotify-7","display":"Some Device 7"},"QUOTED_STRING_0":"the wall","GENERIC_ENTITY_com.spotify:album_0":{"value":"spotify:album:5Dbax7G8SWrP9xyzkOvy2F","display":"The Wall"},"DATE_0":"1979-11-30T00:00:00.000Z"} A: >> expecting = null U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => @org.thingpedia.weather.current(location=new Location(37.442156, -122.1634471, "Palo Alto, California")) => notify; A: The current weather in Palo Alto, California is sunny. The temperature is 60 degrees Fahrenheit and the humidity is 91.3 %. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_display_result ; [ release_date ] of @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . album ( ) filter id =~ QUOTED_STRING_0 #[ results = [ { id = GENERIC_ENTITY_com.spotify:album_0 , release_date = DATE_0 } ] ] #[ count = 4 ] ; @org.thingpedia.weather . current ( location = LOCATION_0 ) #[ results = [ { location = LOCATION_0 , temperature = MEASURE_C_0 , wind_speed = MEASURE_mps_0 , humidity = NUMBER_0 , cloudiness = NUMBER_1 , fog = 0 , status = enum sunny , icon = PICTURE_0 } ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.spotify-7","display":"Some Device 7"},"QUOTED_STRING_0":"the wall","GENERIC_ENTITY_com.spotify:album_0":{"value":"spotify:album:5Dbax7G8SWrP9xyzkOvy2F","display":"The Wall"},"DATE_0":"1979-11-30T00:00:00.000Z","LOCATION_0":{"latitude":37.442156,"longitude":-122.1634471,"display":"Palo Alto, California"},"MEASURE_C_0":{"unit":"C","value":15.6},"MEASURE_mps_0":{"unit":"mps","value":3.4},"NUMBER_0":91.3,"NUMBER_1":4.7,"PICTURE_0":"http://api.met.no/weatherapi/weathericon/1.1/?symbol=1;content_type=image/png"} A: >> expecting = null ==== # 36-reinit U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => (@com.spotify.playable(), id =~ "Nice For What") => notify; A: Nice For What is a music by Drake released in June 28, 2018. Would you like to play it on Spotify? A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_one ; @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . playable ( ) filter id =~ QUOTED_STRING_0 #[ results = [ { id = GENERIC_ENTITY_com.spotify:playable_0 , artists = [ GENERIC_ENTITY_com.spotify:artist_0 ] , genres = [ QUOTED_STRING_1 , QUOTED_STRING_2 , QUOTED_STRING_3 ] , release_date = DATE_0 , popularity = NUMBER_0 } ] ] ; @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . play ( playable = GENERIC_ENTITY_com.spotify:playable_0 ) #[ confirm = enum proposed ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.spotify-7","display":"Some Device 7"},"QUOTED_STRING_0":"Nice For What","GENERIC_ENTITY_com.spotify:playable_0":{"value":"spotify:track:3CA9pLiwRIGtUBiMjbZmRw","display":"Nice For What"},"GENERIC_ENTITY_com.spotify:artist_0":{"value":"spotify:artist:3TVXtAsR1Inumwj472S9r4","display":"Drake"},"QUOTED_STRING_1":"canadian hip hop","QUOTED_STRING_2":"canadian pop","QUOTED_STRING_3":"hip hop","DATE_0":"2018-06-29T00:00:00.000Z","NUMBER_0":79} A: >> expecting = yesno # no thanks U: \r bookkeeping special special:no A: Alright, let me know if I can help you with anything else! A: >> context = null // {} A: >> expecting = null #A: Is there anything else I can help you with? #A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_anything_else ; @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . song ( ) filter id =~ QUOTED_STRING_0 #[ results = [ { id = GENERIC_ENTITY_com.spotify:song_0 , artists = [ GENERIC_ENTITY_com.spotify:artist_0 ] , album = GENERIC_ENTITY_com.spotify:album_0 , genres = [ QUOTED_STRING_1 , QUOTED_STRING_2 , QUOTED_STRING_3 ] , release_date = DATE_0 , popularity = NUMBER_0 , energy = NUMBER_1 , danceability = NUMBER_2 } ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.spotify-7","display":"Some Device 7"},"QUOTED_STRING_0":"Nice For What","GENERIC_ENTITY_com.spotify:song_0":{"value":"spotify:track:3CA9pLiwRIGtUBiMjbZmRw","display":"Nice For What"},"GENERIC_ENTITY_com.spotify:artist_0":{"value":"spotify:artist:3TVXtAsR1Inumwj472S9r4","display":"Drake"},"GENERIC_ENTITY_com.spotify:album_0":{"value":"spotify:album:1ATL5GLyefJaxhQzSPVrLX","display":"Scorpion"},"QUOTED_STRING_1":"canadian hip hop","QUOTED_STRING_2":"canadian pop","QUOTED_STRING_3":"hip hop","DATE_0":"2018-06-29T00:00:00.000Z","NUMBER_0":79,"NUMBER_1":90,"NUMBER_2":58} #A: >> expecting = generic # yes please #U: \r bookkeeping special special:yes #A: How can I help you? #A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_greet ; @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . song ( ) filter id =~ QUOTED_STRING_0 #[ results = [ { id = GENERIC_ENTITY_com.spotify:song_0 , artists = [ GENERIC_ENTITY_com.spotify:artist_0 ] , album = GENERIC_ENTITY_com.spotify:album_0 , genres = [ QUOTED_STRING_1 , QUOTED_STRING_2 , QUOTED_STRING_3 ] , release_date = DATE_0 , popularity = NUMBER_0 , energy = NUMBER_1 , danceability = NUMBER_2 } ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.spotify-7","display":"Some Device 7"},"QUOTED_STRING_0":"Nice For What","GENERIC_ENTITY_com.spotify:song_0":{"value":"spotify:track:3CA9pLiwRIGtUBiMjbZmRw","display":"Nice For What"},"GENERIC_ENTITY_com.spotify:artist_0":{"value":"spotify:artist:3TVXtAsR1Inumwj472S9r4","display":"Drake"},"GENERIC_ENTITY_com.spotify:album_0":{"value":"spotify:album:1ATL5GLyefJaxhQzSPVrLX","display":"Scorpion"},"QUOTED_STRING_1":"canadian hip hop","QUOTED_STRING_2":"canadian pop","QUOTED_STRING_3":"hip hop","DATE_0":"2018-06-29T00:00:00.000Z","NUMBER_0":79,"NUMBER_1":90,"NUMBER_2":58} #A: >> expecting = generic ==== # 37-argminmax-most U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => (sort popularity desc of @com.spotify.song())[1] => notify; # FIXME #A: The answer is ROCKSTAR (feat. Roddy Ricch). It is a song in the album BLAME IT ON BABY by DaBaby. A: I see ROCKSTAR (feat. Roddy Ricch). It is a song in the album BLAME IT ON BABY by DaBaby. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_one ; sort ( popularity desc of @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . song ( ) ) [ 1 ] #[ results = [ { id = GENERIC_ENTITY_com.spotify:song_0 , artists = [ GENERIC_ENTITY_com.spotify:artist_0 , GENERIC_ENTITY_com.spotify:artist_1 ] , album = GENERIC_ENTITY_com.spotify:album_0 , genres = [ QUOTED_STRING_0 , QUOTED_STRING_1 ] , release_date = DATE_0 , popularity = NUMBER_0 , energy = NUMBER_1 , danceability = NUMBER_2 } ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.spotify-7","display":"Some Device 7"},"GENERIC_ENTITY_com.spotify:song_0":{"value":"spotify:track:7ytR5pFWmSjzHJIeQkgog4","display":"ROCKSTAR (feat. Roddy Ricch)"},"GENERIC_ENTITY_com.spotify:artist_0":{"value":"spotify:artist:4r63FhuTkUYltbVAg5TQnk","display":"DaBaby"},"GENERIC_ENTITY_com.spotify:artist_1":{"value":"spotify:artist:757aE44tKEUQEqRuT6GnEB","display":"Roddy Ricch"},"GENERIC_ENTITY_com.spotify:album_0":{"value":"spotify:album:623PL2MBg50Br5dLXC9E9e","display":"BLAME IT ON BABY"},"QUOTED_STRING_0":"north carolina hip hop","QUOTED_STRING_1":"rap","DATE_0":"2020-04-17T00:00:00.000Z","NUMBER_0":100,"NUMBER_1":69,"NUMBER_2":74} A: >> expecting = null ==== # 38-argminmax-least U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => (sort popularity asc of @com.spotify.song())[1] => notify; # FIXME #A: The answer is Love Yourself. It is a song in the album Romantic Pop Songs by Justin Bieber. A: I see Love Yourself. It is a song in the album Romantic Pop Songs by Justin Bieber. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_one ; sort ( popularity asc of @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . song ( ) ) [ 1 ] #[ results = [ { id = GENERIC_ENTITY_com.spotify:song_0 , artists = [ GENERIC_ENTITY_com.spotify:artist_0 ] , album = GENERIC_ENTITY_com.spotify:album_0 , genres = [ QUOTED_STRING_0 , QUOTED_STRING_1 , QUOTED_STRING_2 ] , release_date = DATE_0 , popularity = 0 , energy = NUMBER_0 , danceability = NUMBER_1 } ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.spotify-7","display":"Some Device 7"},"GENERIC_ENTITY_com.spotify:song_0":{"value":"spotify:track:0VXeNEtuiD77F2StUeUadK","display":"Love Yourself"},"GENERIC_ENTITY_com.spotify:artist_0":{"value":"spotify:artist:1uNFoZAHBGtllmzznpCI3s","display":"Justin Bieber"},"GENERIC_ENTITY_com.spotify:album_0":{"value":"spotify:album:74jDw6TsdKnT92V790QfvF","display":"Romantic Pop Songs"},"QUOTED_STRING_0":"canadian pop","QUOTED_STRING_1":"pop","QUOTED_STRING_2":"post-teen pop","DATE_0":"2020-08-10T00:00:00.000Z","NUMBER_0":43,"NUMBER_1":78} A: >> expecting = null ==== # 39-argminmax-2 U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => (sort reviewCount desc of @com.yelp.restaurant())[1] => notify; A: The restaurant with the highest review count is NOLA Restaurant & Bar. It is an expensive restaurant rated 3.5 star. A: rdl: NOLA Restaurant & Bar https://www.yelp.com/biz/nola-restaurant-and-bar-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_one ; sort ( reviewCount desc of @com.yelp . restaurant ( ) ) [ 1 ] #[ results = [ { id = GENERIC_ENTITY_com.yelp:restaurant_0 , image_url = PICTURE_0 , link = URL_0 , cuisines = [ GENERIC_ENTITY_com.yelp:restaurant_cuisine_0 , GENERIC_ENTITY_com.yelp:restaurant_cuisine_1 ] , price = enum expensive , rating = NUMBER_0 , reviewCount = NUMBER_1 , geo = LOCATION_0 , phone = PHONE_NUMBER_0 } ] ] ; // {"GENERIC_ENTITY_com.yelp:restaurant_0":{"value":"jwaXc3VVGDFQu1aCoiXwdw","display":"NOLA Restaurant & Bar"},"PICTURE_0":"https://s3-media2.fl.yelpcdn.com/bphoto/tna5SSdgZq3fFxoi4-Xx7A/o.jpg","URL_0":"https://www.yelp.com/biz/nola-restaurant-and-bar-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg","GENERIC_ENTITY_com.yelp:restaurant_cuisine_0":{"value":"cajun","display":"Cajun/Creole"},"GENERIC_ENTITY_com.yelp:restaurant_cuisine_1":{"value":"newamerican","display":"American (New)"},"NUMBER_0":3.5,"NUMBER_1":2821,"LOCATION_0":{"latitude":37.4450225830078,"longitude":-122.161323547363,"display":null},"PHONE_NUMBER_0":"+16503282722"} A: >> expecting = null ==== # 40-argminmax-2-least U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => (sort reviewCount asc of @com.yelp.restaurant())[1] => notify; A: The restaurant with the lowest review count is The Ivy Cambridge Brasserie. It is a restaurant rated 4.5 star with British food. A: rdl: The Ivy Cambridge Brasserie https://www.yelp.com/biz/the-ivy-cambridge-brasserie-cambridge?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_one ; sort ( reviewCount asc of @com.yelp . restaurant ( ) ) [ 1 ] #[ results = [ { id = GENERIC_ENTITY_com.yelp:restaurant_0 , image_url = PICTURE_0 , link = URL_0 , cuisines = [ GENERIC_ENTITY_com.yelp:restaurant_cuisine_0 ] , rating = NUMBER_0 , reviewCount = 12 , geo = LOCATION_0 , phone = PHONE_NUMBER_0 } ] ] ; // {"GENERIC_ENTITY_com.yelp:restaurant_0":{"value":"yzBYyndSQ3RI6Hci2F9pRQ","display":"The Ivy Cambridge Brasserie"},"PICTURE_0":"https://s3-media4.fl.yelpcdn.com/bphoto/9daDsE_Aq-AtJnDDPruBSQ/o.jpg","URL_0":"https://www.yelp.com/biz/the-ivy-cambridge-brasserie-cambridge?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg","GENERIC_ENTITY_com.yelp:restaurant_cuisine_0":{"value":"british","display":"British"},"NUMBER_0":4.5,"LOCATION_0":{"latitude":52.2069714284192,"longitude":0.118247921026355,"display":null},"PHONE_NUMBER_0":"+441223344044"} A: >> expecting = null ==== # 41-cat-picture # get a cat picture U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: @com.thecatapi.get(); A: Here is your cat picture. A: rdl: str:ENTITY_tt:url::42: str:ENTITY_tt:url::42: A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_display_result ; @com.thecatapi . get ( ) #[ results = [ { id = GENERIC_ENTITY_com.thecatapi:image_id_0 , picture_url = PICTURE_0 , link = URL_0 } ] ] ; // {"GENERIC_ENTITY_com.thecatapi:image_id_0":{"value":"str:ENTITY_com.thecatapi:image_id::0:","display":null},"PICTURE_0":"str:ENTITY_tt:picture::36:","URL_0":"str:ENTITY_tt:url::42:"} A: >> expecting = null ==== # 42-xkcd # get xkcd U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: @com.xkcd.comic(); A: I see 20 and 451. 20 is released on January 20, 2018, while 451 is released on March 20, 2020. A: rdl: Some Device com.xkcd str:ENTITY_tt:url::1: A: rdl: str:QUOTED_STRING::49: str:ENTITY_tt:url::28: A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_two ; @com.xkcd . comic ( ) #[ results = [ { id = NUMBER_0 , title = QUOTED_STRING_0 , release_date = DATE_0 , picture_url = PICTURE_0 , link = URL_0 , alt_text = QUOTED_STRING_0 } ] ] #[ count = NUMBER_1 ] #[ more = true ] ; // {"NUMBER_0":20,"QUOTED_STRING_0":"Some Device com.xkcd","DATE_0":"2018-01-20T08:00:00.000Z","PICTURE_0":"str:ENTITY_tt:picture::14:","URL_0":"str:ENTITY_tt:url::1:","NUMBER_1":50} A: >> expecting = null ==== # 43-xkcd-latest # get latest xkcd U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: sort(release_date desc of @com.xkcd.comic())[1]; A: The latest xkcd comic is 371. It is an xkcd comic from August 31, 2020 titled str:QUOTED_STRING::3:. A: rdl: str:QUOTED_STRING::3: str:ENTITY_tt:url::39: A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_one ; sort ( release_date desc of @com.xkcd . comic ( ) ) [ 1 ] #[ results = [ { id = NUMBER_0 , title = QUOTED_STRING_0 , release_date = DATE_0 , picture_url = PICTURE_0 , link = URL_0 , alt_text = QUOTED_STRING_1 } ] ] ; // {"NUMBER_0":371,"QUOTED_STRING_0":"str:QUOTED_STRING::3:","DATE_0":"2020-08-31T07:00:00.000Z","PICTURE_0":"str:ENTITY_tt:picture::26:","URL_0":"str:ENTITY_tt:url::39:","QUOTED_STRING_1":"str:QUOTED_STRING::6:"} A: >> expecting = null ==== # 44-complex-confirmation U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: @com.xkcd.comic() => @com.twitter.post(status=title); A: You have multiple Twitter devices. Which one do you want to use? A: choice 0: Twitter Account foo A: choice 1: Twitter Account bar A: >> context = $dialogue @org.thingpedia.dialogue.transaction . execute ; @com.xkcd . comic ( ) => @com.twitter . post ( status = title ) ; // {} A: >> expecting = choice U: \t $choice ( 0 ); A: Ok, do you want me to get xkcd comic and then tweet the title? A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_confirm_action ; @com.xkcd . comic ( ) => @com.twitter ( id = GENERIC_ENTITY_tt:device_id_0 ) . post ( status = title ) ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"twitter-foo","display":"Twitter Account foo"}} A: >> expecting = yesno U: \t $yes; A: I tweeted something. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_action_success ; @com.xkcd . comic ( ) => @com.twitter ( id = GENERIC_ENTITY_tt:device_id_0 ) . post ( status = title ) #[ results = [ { status = QUOTED_STRING_0 , __device = GENERIC_ENTITY_tt:device_id_0 } ] ] #[ count = NUMBER_0 ] #[ more = true ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"twitter-foo","display":"Twitter Account foo"},"QUOTED_STRING_0":"Some Device com.xkcd","NUMBER_0":50} A: >> expecting = null ==== # 44-faq-about-genie # Who are you? U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: @org.thingpedia.builtin.thingengine.builtin.faq_reply(question=enum about_almond_identity); # FIXME the simulator doesn't actually call the API so this is useless # we need the scenario tests from thingpedia-common-devices A: Str:QUOTED_STRING::42:. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_action_success ; @org.thingpedia.builtin.thingengine.builtin . faq_reply ( question = enum about_almond_identity ) #[ results = [ { question = enum about_almond_identity , reply = QUOTED_STRING_0 } ] ] ; // {"QUOTED_STRING_0":"str:QUOTED_STRING::42:"} A: >> expecting = null ==== # 45-not-configured-light-bulb # Turn off the lights U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: @org.thingpedia.iot.light-bulb.set_power(power=enum(off)); A: You do not have a Light Bulb configured. You will need to enable Home Assistant or Philips Hue before you can use that command. A: link: Configure a new skill /devices/create A: >> context = null // {} A: >> expecting = null ==== # 46-not-configured-door # Is the door open U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: @org.thingpedia.iot.door.state(); A: You need to enable Home Assistant before you can use that command. A: link: Configure Home Assistant /devices/create A: >> context = null // {} A: >> expecting = null ==== # 47-greet-in-the-middle # getting the weather U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: now => @org.thingpedia.weather.current(location=new Location(37.442156, -122.1634471, "Palo Alto, California")) => notify; A: The current weather in Palo Alto, California is sunny. The temperature is 60 degrees Fahrenheit and the humidity is 91.3 %. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_display_result ; @org.thingpedia.weather . current ( location = LOCATION_0 ) #[ results = [ { location = LOCATION_0 , temperature = MEASURE_C_0 , wind_speed = MEASURE_mps_0 , humidity = NUMBER_0 , cloudiness = NUMBER_1 , fog = 0 , status = enum sunny , icon = PICTURE_0 } ] ] ; // {"LOCATION_0":{"latitude":37.442156,"longitude":-122.1634471,"display":"Palo Alto, California"},"MEASURE_C_0":{"unit":"C","value":15.6},"MEASURE_mps_0":{"unit":"mps","value":3.4},"NUMBER_0":91.3,"NUMBER_1":4.7,"PICTURE_0":"http://api.met.no/weatherapi/weathericon/1.1/?symbol=1;content_type=image/png"} A: >> expecting = null U: \t $dialogue @org.thingpedia.dialogue.transaction.greet; A: Hello! How can I help you? A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_greet ; @org.thingpedia.weather . current ( location = LOCATION_0 ) #[ results = [ { location = LOCATION_0 , temperature = MEASURE_C_0 , wind_speed = MEASURE_mps_0 , humidity = NUMBER_0 , cloudiness = NUMBER_1 , fog = 0 , status = enum sunny , icon = PICTURE_0 } ] ] ; // {"LOCATION_0":{"latitude":37.442156,"longitude":-122.1634471,"display":"Palo Alto, California"},"MEASURE_C_0":{"unit":"C","value":15.6},"MEASURE_mps_0":{"unit":"mps","value":3.4},"NUMBER_0":91.3,"NUMBER_1":4.7,"PICTURE_0":"http://api.met.no/weatherapi/weathericon/1.1/?symbol=1;content_type=image/png"} A: >> expecting = null U: \t $dialogue @org.thingpedia.dialogue.transaction.cancel; #A: Is there anything else I can help you with? #A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_anything_else ; @org.thingpedia.weather . current ( location = LOCATION_0 ) #[ results = [ { location = LOCATION_0 , temperature = MEASURE_C_0 , wind_speed = MEASURE_mps_0 , humidity = NUMBER_0 , cloudiness = NUMBER_1 , fog = 0 , status = enum sunny , icon = PICTURE_0 } ] ] ; // {"LOCATION_0":{"latitude":37.442156,"longitude":-122.1634471,"display":"Palo Alto, California"},"MEASURE_C_0":{"unit":"C","value":15.6},"MEASURE_mps_0":{"unit":"mps","value":3.4},"NUMBER_0":91.3,"NUMBER_1":4.7,"PICTURE_0":"http://api.met.no/weatherapi/weathericon/1.1/?symbol=1;content_type=image/png"} #A: >> expecting = generic A: Alright, let me know if I can help you with anything else! A: >> context = null // {} A: >> expecting = null ==== # 48-query-error U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: @org.thingpedia.weather.current(location=new Location(90, 0, "North Pole")); A: Sorry, there was an unexpected error with your command. Please try again later or report this issue to my developers. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_action_error ; @org.thingpedia.weather . current ( location = LOCATION_0 ) #[ results = [ ] ] #[ error = QUOTED_STRING_0 ] ; // {"LOCATION_0":{"latitude":90,"longitude":0,"display":"North Pole"},"QUOTED_STRING_0":"unexpected weather error"} A: >> expecting = null ==== # 49-weather-projection U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: [temperature] of @org.thingpedia.weather.current(location=new Location(37.442156, -122.1634471, "Palo Alto, California")); A: The current weather in Palo Alto, California is sunny. The temperature is 60 degrees Fahrenheit. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_display_result ; [ temperature ] of @org.thingpedia.weather . current ( location = LOCATION_0 ) #[ results = [ { location = LOCATION_0 , temperature = MEASURE_C_0 , status = enum sunny } ] ] ; // {"LOCATION_0":{"latitude":37.442156,"longitude":-122.1634471,"display":"Palo Alto, California"},"MEASURE_C_0":{"unit":"C","value":15.6}} A: >> expecting = null ==== # 50-yelp-projection U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: [rating, geo] of @com.yelp.restaurant(); A: I see Ramen Nagi. It is a restaurant near [Latitude: 37.446 deg, Longitude: -122.161 deg] rated 4.5 star. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_one ; [ geo , rating ] of @com.yelp . restaurant ( ) #[ results = [ { id = GENERIC_ENTITY_com.yelp:restaurant_0 , rating = NUMBER_0 , geo = LOCATION_0 } ] ] #[ count = NUMBER_1 ] #[ more = true ] ; // {"GENERIC_ENTITY_com.yelp:restaurant_0":{"value":"vhfPni9pci29SEHrN1OtRg","display":"Ramen Nagi"},"NUMBER_0":4.5,"LOCATION_0":{"latitude":37.445523,"longitude":-122.1607073261,"display":null},"NUMBER_1":50} A: >> expecting = null ==== # 51-yelp-projection-2 U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: [rating, geo] of @com.yelp.restaurant(), id =~ "ramen nagi"; A: Ramen Nagi is a restaurant near [Latitude: 37.446 deg, Longitude: -122.161 deg] rated 4.5 star. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_one ; [ geo , rating ] of @com.yelp . restaurant ( ) filter id =~ QUOTED_STRING_0 #[ results = [ { id = GENERIC_ENTITY_com.yelp:restaurant_0 , rating = NUMBER_0 , geo = LOCATION_0 } ] ] ; // {"QUOTED_STRING_0":"ramen nagi","GENERIC_ENTITY_com.yelp:restaurant_0":{"value":"vhfPni9pci29SEHrN1OtRg","display":"Ramen Nagi"},"NUMBER_0":4.5,"LOCATION_0":{"latitude":37.445523,"longitude":-122.1607073261,"display":null}} A: >> expecting = null ==== # 52-issue-529 U: \t $dialogue @org.thingpedia.dialogue.transaction.cancel; #A: Is there anything else I can help you with? #A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_anything_else ; // {} #A: >> expecting = generic #U: \t $no; A: Alright, let me know if I can help you with anything else! A: >> context = null // {} A: >> expecting = null ==== # 53-time-and-date U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: @org.thingpedia.builtin.thingengine.builtin.get_time(); A: Right now, it's 5:50 PM. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_display_result ; @org.thingpedia.builtin.thingengine.builtin . get_time ( ) #[ results = [ { time = TIME_0 } ] ] ; // {"TIME_0":{"hour":17,"minute":50,"second":0}} A: >> expecting = null U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: @org.thingpedia.builtin.thingengine.builtin.get_date(); A: Today is January 20, 2018. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_display_result ; @org.thingpedia.builtin.thingengine.builtin . get_time ( ) #[ results = [ { time = TIME_0 } ] ] ; @org.thingpedia.builtin.thingengine.builtin . get_date ( ) #[ results = [ { date = DATE_0 } ] ] ; // {"TIME_0":{"hour":17,"minute":50,"second":0},"DATE_0":"2018-01-20T08:00:00.000Z"} A: >> expecting = null ==== # 54-list-result-phrases U: \t @org.thingpedia.builtin.test.get_data(size=5byte, count=1); A: The answer is !!!!! A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_one ; @org.thingpedia.builtin.test . get_data ( count = 1 , size = MEASURE_byte_0 ) #[ results = [ { data = QUOTED_STRING_0 , count = 1 , size = MEASURE_byte_0 } ] ] ; // {"MEASURE_byte_0":{"unit":"byte","value":5},"QUOTED_STRING_0":"!!!!!"} A: >> expecting = null U: \t @org.thingpedia.builtin.test.get_data(size=5byte, count=2); A: First answer for 2 items of size 5 bytes is !!!!! 2 nd answer is """"". A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_two ; @org.thingpedia.builtin.test . get_data ( count = 2 , size = MEASURE_byte_0 ) #[ results = [ { data = QUOTED_STRING_0 , count = 2 , size = MEASURE_byte_0 } ] ] #[ count = 2 ] ; // {"MEASURE_byte_0":{"unit":"byte","value":5},"QUOTED_STRING_0":"!!!!!"} A: >> expecting = null U: \t @org.thingpedia.builtin.test.get_data(size=5byte, count=3); A: First answer for 3 items of size 5 bytes is !!!!! 2 nd answer is """"". 3 rd answer is #####. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_three ; @org.thingpedia.builtin.test . get_data ( count = 3 , size = MEASURE_byte_0 ) #[ results = [ { data = QUOTED_STRING_0 , count = 3 , size = MEASURE_byte_0 } ] ] #[ count = 3 ] ; // {"MEASURE_byte_0":{"unit":"byte","value":5},"QUOTED_STRING_0":"!!!!!"} A: >> expecting = null U: \t @org.thingpedia.builtin.test.get_data2(size=5byte, count=3); A: The answers for 3 items of size 5 bytes are AAAAA, BBBBB, and CCCCC. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_three ; @org.thingpedia.builtin.test . get_data ( count = 3 , size = MEASURE_byte_0 ) #[ results = [ { data = QUOTED_STRING_0 , count = 3 , size = MEASURE_byte_0 } ] ] #[ count = 3 ] ; @org.thingpedia.builtin.test . get_data2 ( count = 3 , size = MEASURE_byte_0 ) #[ results = [ { data = QUOTED_STRING_1 , count = 3 , size = MEASURE_byte_0 } ] ] #[ count = 3 ] ; // {"MEASURE_byte_0":{"unit":"byte","value":5},"QUOTED_STRING_0":"!!!!!","QUOTED_STRING_1":"AAAAA"} A: >> expecting = null ==== # 55-basic-streams U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: timer(interval=1h, base=$now) => @com.thecatapi.get(); A: What is your phone number? A: >> context = $dialogue @org.thingpedia.dialogue.transaction . execute ; timer ( base = $now , interval = DURATION_0 ) => @com.thecatapi . get ( ) ; // {"DURATION_0":{"unit":"h","value":1}} A: >> expecting = phone_number U: \t $answer("555-12345678"^^tt:phone_number); A: Alright, I will get the cat picture every 60 minutes. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_rule_enable_success ; timer ( base = $now , interval = DURATION_0 ) => @com.thecatapi . get ( ) #[ results = [ ] ] ; // {"DURATION_0":{"unit":"h","value":1}} A: >> expecting = null ==== # 56-notifications-from-queries U: \t $dialogue @org.thingpedia.dialogue.transaction.notification("CatAPI"); U: timer(interval=1h, base=$now) => @com.thecatapi.get() U: #[results=[{ id="e7e"^^com.thecatapi:cat, picture_url="https://25.media.tumblr.com/tumblr_m4ry1ocUb21r6jd7fo1_500.jpg"^^tt:picture, link="http://thecatapi.com/?id=e7e"^^tt:url }]]; A: Notification from CatAPI: here is your cat picture. # FIXME: the picture is missing here because of how the test is built, but it should appear in practice A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_display_result ; timer ( base = $now , interval = DURATION_0 ) => @com.thecatapi . get ( ) #[ results = [ { id = GENERIC_ENTITY_com.thecatapi:cat_0 , picture_url = PICTURE_0 , link = URL_0 } ] ] ; // {"DURATION_0":{"unit":"h","value":1},"GENERIC_ENTITY_com.thecatapi:cat_0":{"value":"e7e","display":null},"PICTURE_0":"https://25.media.tumblr.com/tumblr_m4ry1ocUb21r6jd7fo1_500.jpg","URL_0":"http://thecatapi.com/?id=e7e"} A: >> expecting = null ==== # 57-notifications-from-list-queries U: \t $dialogue @org.thingpedia.dialogue.transaction.notification("Yelp"); U: timer(interval=1h, base=$now) => @com.yelp.restaurant() U: #[results=[{ id = "vhfPni9pci29SEHrN1OtRg"^^com.yelp:restaurant("Ramen Nagi") , image_url = "https://s3-media3.fl.yelpcdn.com/bphoto/OKCXWIEFIkNdvkqETl0Bqw/o.jpg"^^tt:picture , link = "https://www.yelp.com/biz/ramen-nagi-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg"^^tt:url , cuisines = [ "ramen"^^com.yelp:restaurant_cuisine("Ramen"), "noodles"^^com.yelp:restaurant_cuisine("Noodles") ] , price = enum moderate , rating = 4.5 , reviewCount = 1625 , geo = new Location(37.445523,-122.1607073261) }]]; A: Notification from Yelp: I see Ramen Nagi. It is a moderate restaurant rated 4.5 star. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_one ; timer ( base = $now , interval = DURATION_0 ) => @com.yelp . restaurant ( ) #[ results = [ { id = GENERIC_ENTITY_com.yelp:restaurant_0 , image_url = PICTURE_0 , link = URL_0 , cuisines = [ GENERIC_ENTITY_com.yelp:restaurant_cuisine_0 , GENERIC_ENTITY_com.yelp:restaurant_cuisine_1 ] , price = enum moderate , rating = NUMBER_0 , reviewCount = NUMBER_1 , geo = LOCATION_0 } ] ] ; // {"DURATION_0":{"unit":"h","value":1},"GENERIC_ENTITY_com.yelp:restaurant_0":{"value":"vhfPni9pci29SEHrN1OtRg","display":"Ramen Nagi"},"PICTURE_0":"https://s3-media3.fl.yelpcdn.com/bphoto/OKCXWIEFIkNdvkqETl0Bqw/o.jpg","URL_0":"https://www.yelp.com/biz/ramen-nagi-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg","GENERIC_ENTITY_com.yelp:restaurant_cuisine_0":{"value":"ramen","display":"Ramen"},"GENERIC_ENTITY_com.yelp:restaurant_cuisine_1":{"value":"noodles","display":"Noodles"},"NUMBER_0":4.5,"NUMBER_1":1625,"LOCATION_0":{"latitude":37.445523,"longitude":-122.1607073261,"display":null}} A: >> expecting = null ==== # 58-notifications-from-list-queries-2 U: \t $dialogue @org.thingpedia.dialogue.transaction.notification("Yelp"); U: timer(interval=1h, base=$now) => sort(rating desc of @com.yelp.restaurant())[1] U: #[results=[{ id = "vhfPni9pci29SEHrN1OtRg"^^com.yelp:restaurant("Ramen Nagi") , image_url = "https://s3-media3.fl.yelpcdn.com/bphoto/OKCXWIEFIkNdvkqETl0Bqw/o.jpg"^^tt:picture , link = "https://www.yelp.com/biz/ramen-nagi-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg"^^tt:url , cuisines = [ "ramen"^^com.yelp:restaurant_cuisine("Ramen"), "noodles"^^com.yelp:restaurant_cuisine("Noodles") ] , price = enum moderate , rating = 4.5 , reviewCount = 1625 , geo = new Location(37.445523,-122.1607073261) }]]; A: Notification from Yelp: the restaurant with the highest rating is Ramen Nagi. It is a moderate restaurant rated 4.5 star. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_one ; timer ( base = $now , interval = DURATION_0 ) => sort ( rating desc of @com.yelp . restaurant ( ) ) [ 1 ] #[ results = [ { id = GENERIC_ENTITY_com.yelp:restaurant_0 , image_url = PICTURE_0 , link = URL_0 , cuisines = [ GENERIC_ENTITY_com.yelp:restaurant_cuisine_0 , GENERIC_ENTITY_com.yelp:restaurant_cuisine_1 ] , price = enum moderate , rating = NUMBER_0 , reviewCount = NUMBER_1 , geo = LOCATION_0 } ] ] ; // {"DURATION_0":{"unit":"h","value":1},"GENERIC_ENTITY_com.yelp:restaurant_0":{"value":"vhfPni9pci29SEHrN1OtRg","display":"Ramen Nagi"},"PICTURE_0":"https://s3-media3.fl.yelpcdn.com/bphoto/OKCXWIEFIkNdvkqETl0Bqw/o.jpg","URL_0":"https://www.yelp.com/biz/ramen-nagi-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg","GENERIC_ENTITY_com.yelp:restaurant_cuisine_0":{"value":"ramen","display":"Ramen"},"GENERIC_ENTITY_com.yelp:restaurant_cuisine_1":{"value":"noodles","display":"Noodles"},"NUMBER_0":4.5,"NUMBER_1":1625,"LOCATION_0":{"latitude":37.445523,"longitude":-122.1607073261,"display":null}} A: >> expecting = null ==== # 59-notifications-from-actions U: \t $dialogue @org.thingpedia.dialogue.transaction.notification("Lightbulb"); U: timer(interval=1h, base=$now) => @org.thingpedia.iot.light-bulb(id="io.home-assistant/lights.living_room_1"^^tt:device_id("Living Room")).set_power(power=enum off) U: #[results=[{ power = enum off }]]; A: Notification from Lightbulb: I turned off your Living Room light bulb. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_action_success ; timer ( base = $now , interval = DURATION_0 ) => @org.thingpedia.iot.light-bulb ( id = GENERIC_ENTITY_tt:device_id_0 ) . set_power ( power = enum off ) #[ results = [ { power = enum off } ] ] ; // {"DURATION_0":{"unit":"h","value":1},"GENERIC_ENTITY_tt:device_id_0":{"value":"io.home-assistant/lights.living_room_1","display":"Living Room"}} A: >> expecting = null ==== # 60-list-default-templates U: \t @com.yelp.restaurant()[1:3]; A: I see Ramen Nagi, Evvia Estiatorio, and Oren's Hummus. Ramen Nagi is rated 4.5 star, Evvia Estiatorio is rated 4.5 star, and Oren's Hummus is rated 4 star. A: rdl: Ramen Nagi https://www.yelp.com/biz/ramen-nagi-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg A: rdl: Evvia Estiatorio https://www.yelp.com/biz/evvia-estiatorio-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg A: rdl: Oren's Hummus https://www.yelp.com/biz/orens-hummus-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_three ; @com.yelp . restaurant ( ) [ 1 : 3 ] #[ results = [ { id = GENERIC_ENTITY_com.yelp:restaurant_0 , image_url = PICTURE_0 , link = URL_0 , cuisines = [ GENERIC_ENTITY_com.yelp:restaurant_cuisine_0 , GENERIC_ENTITY_com.yelp:restaurant_cuisine_1 ] , price = enum moderate , rating = NUMBER_0 , reviewCount = NUMBER_1 , geo = LOCATION_0 } ] ] #[ count = 3 ] ; // {"GENERIC_ENTITY_com.yelp:restaurant_0":{"value":"vhfPni9pci29SEHrN1OtRg","display":"Ramen Nagi"},"PICTURE_0":"https://s3-media3.fl.yelpcdn.com/bphoto/OKCXWIEFIkNdvkqETl0Bqw/o.jpg","URL_0":"https://www.yelp.com/biz/ramen-nagi-palo-alto?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg","GENERIC_ENTITY_com.yelp:restaurant_cuisine_0":{"value":"ramen","display":"Ramen"},"GENERIC_ENTITY_com.yelp:restaurant_cuisine_1":{"value":"noodles","display":"Noodles"},"NUMBER_0":4.5,"NUMBER_1":1625,"LOCATION_0":{"latitude":37.445523,"longitude":-122.1607073261,"display":null}} A: >> expecting = null U: \t [reviewCount] of @com.yelp.restaurant()[1:3]; A: Ramen Nagi has 1,625 reviews, Evvia Estiatorio has 2,393 reviews, and Oren's Hummus has 2,248 reviews. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_three ; [ reviewCount ] of @com.yelp . restaurant ( ) [ 1 : 3 ] #[ results = [ { id = GENERIC_ENTITY_com.yelp:restaurant_0 , reviewCount = NUMBER_0 } ] ] #[ count = 3 ] ; // {"GENERIC_ENTITY_com.yelp:restaurant_0":{"value":"vhfPni9pci29SEHrN1OtRg","display":"Ramen Nagi"},"NUMBER_0":1625} A: >> expecting = null ==== # 61-anon-basic-streams U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: timer(interval=1h, base=$now) => @com.thecatapi.get(); A: What is your phone number? A: >> context = $dialogue @org.thingpedia.dialogue.transaction . execute ; timer ( base = $now , interval = DURATION_0 ) => @com.thecatapi . get ( ) ; // {"DURATION_0":{"unit":"h","value":1}} A: >> expecting = phone_number ==== # 62-anon-actions U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: @com.twitter.post(); A: To use this command you must first create a personal Genie account. A: link: Sign up for Genie /user/register A: >> context = null // {} A: >> expecting = null ==== # 63-list-notifications U: \t $dialogue @org.thingpedia.dialogue.transaction.notification("some app"); U: monitor(@org.thingpedia.builtin.test.get_data(count=2, size=10byte)) => @org.thingpedia.builtin.test.dup_data(data_in=data) U: #[results=[ U: { data_in="!!!!!!!!!!", data_out="!!!!!!!!!!!!!!!!!!!!", count=2, size=10, data="!!!!!!!!!!" } U: ]]; A: Notification from some app: the answer is !!!!!!!!!!!!!!!!!!!! A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_one ; monitor ( @org.thingpedia.builtin.test . get_data ( count = 2 , size = MEASURE_byte_0 ) ) => @org.thingpedia.builtin.test . dup_data ( data_in = data ) #[ results = [ { data_in = QUOTED_STRING_0 , data_out = QUOTED_STRING_1 , count = 2 , size = 10 , data = QUOTED_STRING_0 } ] ] ; // {"MEASURE_byte_0":{"unit":"byte","value":10},"QUOTED_STRING_0":"!!!!!!!!!!","QUOTED_STRING_1":"!!!!!!!!!!!!!!!!!!!!"} A: >> expecting = null ==== # 64-device-names-and-selectors U: \t @org.thingpedia.iot.switch.state(); A: You have multiple switch devices. Which one do you want to use? A: choice 0: Bed Switch 1 A: choice 1: Bed Switch 2 A: choice 2: Kitchen Switches A: choice 3: Ceiling Switches A: choice 4: Büro Decke A: >> context = $dialogue @org.thingpedia.dialogue.transaction . execute ; @org.thingpedia.iot.switch . state ( ) ; // {} A: >> expecting = choice U: \t $choice(0); A: The Bed Switch 1 switch is off. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_display_result ; @org.thingpedia.iot.switch ( id = GENERIC_ENTITY_tt:device_id_0 ) . state ( ) #[ results = [ { state = enum off , __device = GENERIC_ENTITY_tt:device_id_0 } ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"switch-bed1","display":"Bed Switch 1"}} A: >> expecting = null U: \t @org.thingpedia.iot.switch(name="kitchen").state(); A: The Kitchen Switches switch is off. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_display_result ; @org.thingpedia.iot.switch ( id = GENERIC_ENTITY_tt:device_id_0 ) . state ( ) #[ results = [ { state = enum off , __device = GENERIC_ENTITY_tt:device_id_0 } ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"switch-kitchen","display":"Kitchen Switches"}} A: >> expecting = null U: \t @org.thingpedia.iot.switch(all=true).state(); A: The Simulated Device org.thingpedia.iot.switch 0 switch is on. The Simulated Device org.thingpedia.iot.switch 1 switch is on. The Simulated Device org.thingpedia.iot.switch 2 switch is on. The Simulated Device org.thingpedia.iot.switch 3 switch is off. The Simulated Device org.thingpedia.iot.switch 4 switch is on. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_display_result ; @org.thingpedia.iot.switch ( all = true ) . state ( ) #[ results = [ { state = enum on , __device = GENERIC_ENTITY_tt:device_id_0 } ] ] #[ count = 6 ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"str:ENTITY_tt:device_id::0:","display":"Simulated Device org.thingpedia.iot.switch 0"}} A: >> expecting = null U: \t @org.thingpedia.iot.switch(all=true, name="bed").state(); A: The Simulated Device org.thingpedia.iot.switch 0 switch is on. The Simulated Device org.thingpedia.iot.switch 1 switch is on. The Simulated Device org.thingpedia.iot.switch 2 switch is on. The Simulated Device org.thingpedia.iot.switch 3 switch is on. The Simulated Device org.thingpedia.iot.switch 4 switch is off. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_display_result ; @org.thingpedia.iot.switch ( all = true , name = QUOTED_STRING_0 ) . state ( ) #[ results = [ { state = enum on , __device = GENERIC_ENTITY_tt:device_id_0 } ] ] #[ count = 6 ] ; // {"QUOTED_STRING_0":"bed","GENERIC_ENTITY_tt:device_id_0":{"value":"str:ENTITY_tt:device_id::0:","display":"Simulated Device org.thingpedia.iot.switch 0"}} A: >> expecting = null ==== # 65-yelp-result U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: @com.yelp.restaurant() filter contains(cuisines, "chinese"^^com.yelp:restaurant_cuisine("Chinese")) && geo == new Location(37.4863239, -122.232523, "Redwood City, California") U: #[results=[ U: { id="dLbBSJeyN85FIzHxb6oYtg"^^com.yelp:restaurant("Crouching Tiger Restaurant & Bar"), image_url="https://s3-media2.fl.yelpcdn.com/bphoto/ve7XevVMUGbqXg3eZtRpgw/o.jpg"^^tt:picture, link="https://www.yelp.com/biz/crouching-tiger-restaurant-and-bar-redwood-city?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg"^^tt:url, cuisines=["chinese"^^com.yelp:restaurant_cuisine("Chinese")], price=enum moderate, rating=4, review_count=963, geo=new Location(37.48640133, -122.23424633, "2644 Broadway St, Redwood City, CA 94063"), phone="+16502988881"^^tt:phone_number }, U: { id="aRu3VeiAZu4YKN9PvYvpYw"^^com.yelp:restaurant("I Dumpling"), image_url="https://s3-media3.fl.yelpcdn.com/bphoto/8__mq-BV_Xq6IKHhOH1_lA/o.jpg"^^tt:picture, link="https://www.yelp.com/biz/i-dumpling-redwood-city?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg"^^tt:url, cuisines=["chinese"^^com.yelp:restaurant_cuisine("Chinese"), "taiwanese"^^com.yelp:restaurant_cuisine("Taiwanese"), "seafood"^^com.yelp:restaurant_cuisine("Seafood")], price=enum cheap, rating=4, review_count=734, geo=new Location(37.486368908140925, -122.23466476656478, "2660 Broadway, Redwood City, CA 94063"), phone="+16505689789"^^tt:phone_number }, U: { id="7WLVcOSqcBJZG36_rdI3CA"^^com.yelp:restaurant("Redwood Bistro"), image_url="https://s3-media2.fl.yelpcdn.com/bphoto/NZRObUQiHmKDkBRHIMaseQ/o.jpg"^^tt:picture, link="https://www.yelp.com/biz/redwood-bistro-redwood-city?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg"^^tt:url, cuisines=["chinese"^^com.yelp:restaurant_cuisine("Chinese")], price=enum moderate, rating=4.5, review_count=333, geo=new Location(37.48712, -122.23548, "711 El Camino Real, Redwood City, CA 94063"), phone="+16502169988"^^tt:phone_number }, U: { id="uMu3grYWk3ERsw8fXlFGvw"^^com.yelp:restaurant("Panda Dumpling"), image_url="https://s3-media2.fl.yelpcdn.com/bphoto/Qheysge21koMREg8aTOCJA/o.jpg"^^tt:picture, link="https://www.yelp.com/biz/panda-dumpling-san-carlos?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg"^^tt:url, cuisines=["chinese"^^com.yelp:restaurant_cuisine("Chinese")], price=enum moderate, rating=4, review_count=630, geo=new Location(37.49904, -122.25199, "1195 Laurel St, San Carlos, CA 94070"), phone="+16505938888"^^tt:phone_number }, U: { id="a6YM6lvO5ATmvnX3Ozdq9Q"^^com.yelp:restaurant("Hot Wok Bistro Too"), image_url="https://s3-media1.fl.yelpcdn.com/bphoto/JeGbwhkzpWZ2kkHUzFGaTQ/o.jpg"^^tt:picture, link="https://www.yelp.com/biz/hot-wok-bistro-too-san-carlos-2?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg"^^tt:url, cuisines=["chinese"^^com.yelp:restaurant_cuisine("Chinese")], price=enum cheap, rating=4, review_count=265, geo=new Location(37.4957223292802, -122.248010847522, "1541 Laurel St, San Carlos, CA 94070"), phone="+16506224979"^^tt:phone_number }, U: { id="S8ecMU_Sx0esyI7YDC_5Yw"^^com.yelp:restaurant("Amazing Wok"), image_url="https://s3-media3.fl.yelpcdn.com/bphoto/PwbTj_RDUipr1ENVNMuyKA/o.jpg"^^tt:picture, link="https://www.yelp.com/biz/amazing-wok-san-carlos?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg"^^tt:url, cuisines=["chinese"^^com.yelp:restaurant_cuisine("Chinese")], price=enum moderate, rating=4, review_count=331, geo=new Location(37.49475, -122.24667, "1653 Laurel St, San Carlos, CA 94070"), phone="+16505952031"^^tt:phone_number }, U: { id="bnKsZLJChHEnFV9g7mkxnA"^^com.yelp:restaurant("Yan's Garden"), image_url="https://s3-media3.fl.yelpcdn.com/bphoto/gwmPoE50BMxQFyV9SlJ5bw/o.jpg"^^tt:picture, link="https://www.yelp.com/biz/yans-garden-san-carlos?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg"^^tt:url, cuisines=["chinese"^^com.yelp:restaurant_cuisine("Chinese")], price=enum moderate, rating=4, review_count=378, geo=new Location(37.5028084428936, -122.256572279751, "885 Laurel St, San Carlos, CA 94070"), phone="+16505939777"^^tt:phone_number }, U: { id="cYCXa_lfNmj-E7RiT11u6Q"^^com.yelp:restaurant("Red Hot Chilli Pepper"), image_url="https://s3-media4.fl.yelpcdn.com/bphoto/PUmvsVPC5g7GefjCcsz14A/o.jpg"^^tt:picture, link="https://www.yelp.com/biz/red-hot-chilli-pepper-san-carlos?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg"^^tt:url, cuisines=["chinese"^^com.yelp:restaurant_cuisine("Chinese"), "asianfusion"^^com.yelp:restaurant_cuisine("Asian Fusion"), "indpak"^^com.yelp:restaurant_cuisine("Indian")], price=enum moderate, rating=3.5, review_count=1249, geo=new Location(37.506844238722685, -122.26054660000001, "1125 San Carlos Ave, San Carlos, CA 94070"), phone="+16504533055"^^tt:phone_number }, U: { id="NhrRXDU6LaTf1wwwuU0Odg"^^com.yelp:restaurant("Seapot 海中锅"), image_url="https://s3-media2.fl.yelpcdn.com/bphoto/xKaXHOTfFgH9Don6nCOwFw/o.jpg"^^tt:picture, link="https://www.yelp.com/biz/seapot-%E6%B5%B7%E4%B8%AD%E9%94%85-san-mateo?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg"^^tt:url, cuisines=["seafood"^^com.yelp:restaurant_cuisine("Seafood"), "hotpot"^^com.yelp:restaurant_cuisine("Hot Pot"), "chinese"^^com.yelp:restaurant_cuisine("Chinese")], price=enum moderate, rating=4, review_count=1425, geo=new Location(37.54851, -122.31128, "1952 S El Camino Real, San Mateo, CA 94403"), phone="+16503152827"^^tt:phone_number }, U: { id="4Bn7z4IPxBk9dF3EpTqMQg"^^com.yelp:restaurant("Happy Lamb Hot Pot"), image_url="https://s3-media1.fl.yelpcdn.com/bphoto/7bmq96JdaoBLTieJL04efA/o.jpg"^^tt:picture, link="https://www.yelp.com/biz/happy-lamb-hot-pot-san-mateo?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg"^^tt:url, cuisines=["chinese"^^com.yelp:restaurant_cuisine("Chinese"), "mongolian"^^com.yelp:restaurant_cuisine("Mongolian"), "hotpot"^^com.yelp:restaurant_cuisine("Hot Pot")], price=enum moderate, rating=4, review_count=1511, geo=new Location(37.5656637, -122.3237292, "215 S Ellsworth Ave, San Mateo, CA 94401"), phone="+16503432566"^^tt:phone_number } U: ]] U: #[count=38]; A: I see Crouching Tiger Restaurant & Bar and I Dumpling. Both are restaurants rated 4 star with Chinese food. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_two ; @com.yelp . restaurant ( ) filter contains ( cuisines , GENERIC_ENTITY_com.yelp:restaurant_cuisine_0 ) && geo == LOCATION_0 #[ results = [ { id = GENERIC_ENTITY_com.yelp:restaurant_0 , image_url = PICTURE_0 , link = URL_0 , cuisines = [ GENERIC_ENTITY_com.yelp:restaurant_cuisine_0 ] , price = enum moderate , rating = 4 , review_count = NUMBER_0 , geo = LOCATION_1 , phone = PHONE_NUMBER_0 } ] ] #[ count = NUMBER_1 ] ; // {"GENERIC_ENTITY_com.yelp:restaurant_cuisine_0":{"value":"chinese","display":"Chinese"},"LOCATION_0":{"latitude":37.4863239,"longitude":-122.232523,"display":"Redwood City, California"},"GENERIC_ENTITY_com.yelp:restaurant_0":{"value":"dLbBSJeyN85FIzHxb6oYtg","display":"Crouching Tiger Restaurant & Bar"},"PICTURE_0":"https://s3-media2.fl.yelpcdn.com/bphoto/ve7XevVMUGbqXg3eZtRpgw/o.jpg","URL_0":"https://www.yelp.com/biz/crouching-tiger-restaurant-and-bar-redwood-city?adjust_creative=hejPBQRox5iXtqGPiDw4dg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hejPBQRox5iXtqGPiDw4dg","NUMBER_0":963,"LOCATION_1":{"latitude":37.48640133,"longitude":-122.23424633,"display":"2644 Broadway St, Redwood City, CA 94063"},"PHONE_NUMBER_0":"+16502988881","NUMBER_1":38} A: >> expecting = null ==== # 66-wakeup U: \t $wakeup; A: Hello! How can I help you? A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_greet ; // {} A: >> expecting = null ==== # 67-default-temperature # alert me when't is hotter than 70 degrees outside U: \t monitor(@org.thingpedia.weather.current()), temperature >= 70defaultTemperature; A: Alright, I will notify you when the current weather in [Latitude: 37.428 deg, Longitude: -122.170 deg] changes and it becomes true that the temperature is greater than or equal to 70 degrees Fahrenheit. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_rule_enable_success ; monitor ( @org.thingpedia.weather . current ( location = LOCATION_0 ) ) filter temperature >= MEASURE_C_0 #[ results = [ ] ] ; // {"LOCATION_0":{"latitude":37.4275,"longitude":-122.1697,"display":null},"MEASURE_C_0":{"unit":"F","value":70}} A: >> expecting = null ==== # 68-bad-device-name U: \t @org.thingpedia.iot.switch(name="invalid").state(); A: I cannot find any invalid switch device. Which device do you want to use? A: choice 0: Bed Switch 1 A: choice 1: Bed Switch 2 A: choice 2: Kitchen Switches A: choice 3: Ceiling Switches A: choice 4: Büro Decke A: >> context = $dialogue @org.thingpedia.dialogue.transaction . execute ; @org.thingpedia.iot.switch ( name = QUOTED_STRING_0 ) . state ( ) ; // {"QUOTED_STRING_0":"invalid"} A: >> expecting = choice ==== # 69-bad-device-name-2 # ignores the name because there is only one spotify account U: \t @com.spotify(name="invalid").song(), id =~ "nice for what"; A: Nice For What is a song in the album Scorpion by Drake. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_one ; @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . song ( ) filter id =~ QUOTED_STRING_0 #[ results = [ { id = GENERIC_ENTITY_com.spotify:song_0 , artists = [ GENERIC_ENTITY_com.spotify:artist_0 ] , album = GENERIC_ENTITY_com.spotify:album_0 , genres = [ QUOTED_STRING_1 , QUOTED_STRING_2 , QUOTED_STRING_3 ] , release_date = DATE_0 , popularity = NUMBER_0 , energy = NUMBER_1 , danceability = NUMBER_2 } ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.spotify-7","display":"Some Device 7"},"QUOTED_STRING_0":"nice for what","GENERIC_ENTITY_com.spotify:song_0":{"value":"spotify:track:3CA9pLiwRIGtUBiMjbZmRw","display":"Nice For What"},"GENERIC_ENTITY_com.spotify:artist_0":{"value":"spotify:artist:3TVXtAsR1Inumwj472S9r4","display":"Drake"},"GENERIC_ENTITY_com.spotify:album_0":{"value":"spotify:album:1ATL5GLyefJaxhQzSPVrLX","display":"Scorpion"},"QUOTED_STRING_1":"canadian hip hop","QUOTED_STRING_2":"canadian pop","QUOTED_STRING_3":"hip hop","DATE_0":"2018-06-29T00:00:00.000Z","NUMBER_0":79,"NUMBER_1":90,"NUMBER_2":58} A: >> expecting = null ==== # 70-pos-priority U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: @com.spotify(id="com.spotify-gcampax"^^tt:device_id("Spotify Account of gcampax")).playable() filter release_date <= new Date("2000-01-01T00:00:00.000Z") + 1year && release_date >= new Date("2000-01-01T00:00:00.000Z") U: #[results=[ U: { id="spotify:track:3AJwUDP919kvQ9QcozQPxg"^^com.spotify:playable("Yellow"), artists=["spotify:artist:4gzpq5DPGxSnKTe4SA8HAU"^^com.spotify:artist("Coldplay")], album="spotify:album:6ZG5lRT77aJ3btmArcykra"^^com.spotify:album("Parachutes"), genres=["permanent wave", "pop"], release_date=new Date("2000-07-10T00:00:00.000Z"), popularity=85, energy=66.10000000000001, danceability=42.9, __device="com.spotify-gcampax"^^tt:device_id("Spotify Account of gcampax") }, U: { id="spotify:track:3yfqSUWxFvZELEM4PmlwIR"^^com.spotify:playable("The Real Slim Shady"), artists=["spotify:artist:7dGJo4pcD2V6oG8kP0tJRR"^^com.spotify:artist("Eminem")], album="spotify:album:6t7956yu5zYf5A829XRiHC"^^com.spotify:album("The Marshall Mathers LP"), genres=["detroit hip hop", "hip hop", "rap"], release_date=new Date("2000-05-23T00:00:00.000Z"), popularity=84, energy=66.10000000000001, danceability=94.89999999999999, __device="com.spotify-gcampax"^^tt:device_id("Spotify Account of gcampax") }, U: { id="spotify:track:0I3q5fE6wg7LIfHGngUTnV"^^com.spotify:playable("Ms. Jackson"), artists=["spotify:artist:1G9G7WwrXka3Z1r7aIDjI7"^^com.spotify:artist("Outkast")], album="spotify:album:2tm3Ht61kqqRZtIYsBjxEj"^^com.spotify:album("Stankonia"), genres=["atl hip hop", "dirty south rap", "hip hop", "rap", "southern hip hop"], release_date=new Date("2000-10-31T00:00:00.000Z"), popularity=82, energy=80.60000000000001, danceability=84.3, __device="com.spotify-gcampax"^^tt:device_id("Spotify Account of gcampax") }, U: { id="spotify:track:6ZOBP3NvffbU4SZcrnt1k6"^^com.spotify:playable("Kryptonite"), artists=["spotify:artist:2RTUTCvo6onsAnheUk3aL9"^^com.spotify:artist("3 Doors Down")], album="spotify:album:5gO2acKSOaJnP0Mcy8IpU6"^^com.spotify:album("The Better Life"), genres=["alternative metal", "nu metal", "pop rock", "post-grunge"], release_date=new Date("2000-01-01T00:00:00.000Z"), popularity=79, energy=86.5, danceability=54.50000000000001, __device="com.spotify-gcampax"^^tt:device_id("Spotify Account of gcampax") }, U: { id="spotify:track:60a0Rd6pjrkxjPbaKzXjfq"^^com.spotify:playable("In the End"), artists=["spotify:artist:6XyY86QOPPrYVGvF9ch6wz"^^com.spotify:artist("Linkin Park")], album="spotify:album:6hPkbAV3ZXpGZBGUvL6jVM"^^com.spotify:album("Hybrid Theory (Bonus Edition)"), genres=["alternative metal", "nu metal", "post-grunge", "rap metal"], release_date=new Date("2000-10-24T00:00:00.000Z"), popularity=83, energy=86.4, danceability=55.60000000000001, __device="com.spotify-gcampax"^^tt:device_id("Spotify Account of gcampax") }, U: { id="spotify:track:40rvBMQizxkIqnjPdEWY1v"^^com.spotify:playable("Down with the Sickness"), artists=["spotify:artist:3TOqt5oJwL9BE2NG9MEwDa"^^com.spotify:artist("Disturbed")], album="spotify:album:6IvosVciDOQ9NAPaKwhtLY"^^com.spotify:album("The Sickness"), genres=["alternative metal", "nu metal", "rap metal"], release_date=new Date("2000-03-07T00:00:00.000Z"), popularity=76, energy=87.6, danceability=69.5, __device="com.spotify-gcampax"^^tt:device_id("Spotify Account of gcampax") }, U: { id="spotify:track:3Gf5nttwcX9aaSQXRWidEZ"^^com.spotify:playable("Ride Wit Me"), artists=["spotify:artist:2gBjLmx6zQnFGQJCAQpRgw"^^com.spotify:artist("Nelly"), "spotify:artist:3L2SIGZah4QZSvN4wC8rHl"^^com.spotify:artist("City Spud")], album="spotify:album:5v7Icroz1sQsK2sQyLrWzE"^^com.spotify:album("Country Grammar"), genres=["dance pop", "hip hop", "pop rap", "rap", "southern hip hop", "st louis rap", "urban contemporary"], release_date=new Date("2000-06-27T00:00:00.000Z"), popularity=75, energy=70, danceability=85, __device="com.spotify-gcampax"^^tt:device_id("Spotify Account of gcampax") }, U: { id="spotify:track:6naxalmIoLFWR0siv8dnQQ"^^com.spotify:playable("Oops!...I Did It Again"), artists=["spotify:artist:26dSoYclwsYLMAKD3tpOr4"^^com.spotify:artist("Britney Spears")], album="spotify:album:5PmgtkodFl2Om3hMXONDll"^^com.spotify:album("Oops!... I Did It Again"), genres=["dance pop", "pop", "post-teen pop"], release_date=new Date("2000-05-16T00:00:00.000Z"), popularity=80, energy=83.39999999999999, danceability=75.1, __device="com.spotify-gcampax"^^tt:device_id("Spotify Account of gcampax") }, U: { id="spotify:track:3UmaczJpikHgJFyBTAJVoz"^^com.spotify:playable("Stan"), artists=["spotify:artist:7dGJo4pcD2V6oG8kP0tJRR"^^com.spotify:artist("Eminem"), "spotify:artist:2mpeljBig2IXLXRAFO9AAs"^^com.spotify:artist("Dido")], album="spotify:album:6t7956yu5zYf5A829XRiHC"^^com.spotify:album("The Marshall Mathers LP"), genres=["detroit hip hop", "hip hop", "rap"], release_date=new Date("2000-05-23T00:00:00.000Z"), popularity=80, energy=76.8, danceability=78, __device="com.spotify-gcampax"^^tt:device_id("Spotify Account of gcampax") }, U: { id="spotify:track:62bOmKYxYg7dhrC6gH9vFn"^^com.spotify:playable("Bye Bye Bye"), artists=["spotify:artist:6Ff53KvcvAj5U7Z1vojB5o"^^com.spotify:artist("*NSYNC")], album="spotify:album:20RMokVwJ2wjQ0s8FOdOFC"^^com.spotify:album("No Strings Attached"), genres=["boy band", "dance pop", "pop", "post-teen pop"], release_date=new Date("2000-03-21T00:00:00.000Z"), popularity=72, energy=92.60000000000001, danceability=61, __device="com.spotify-gcampax"^^tt:device_id("Spotify Account of gcampax") } U: ]] U: #[count=50]; A: I see Yellow and The Real Slim Shady. Yellow is by Coldplay, while The Real Slim Shady is by Eminem. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_two ; @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . playable ( ) filter release_date <= DATE_0 + DURATION_0 && release_date >= DATE_0 #[ results = [ { id = GENERIC_ENTITY_com.spotify:playable_0 , artists = [ GENERIC_ENTITY_com.spotify:artist_0 ] , album = GENERIC_ENTITY_com.spotify:album_0 , genres = [ QUOTED_STRING_0 , QUOTED_STRING_1 ] , release_date = DATE_1 , popularity = NUMBER_0 , energy = NUMBER_1 , danceability = NUMBER_2 , __device = GENERIC_ENTITY_tt:device_id_0 } ] ] #[ count = NUMBER_3 ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.spotify-gcampax","display":"Spotify Account of gcampax"},"DATE_0":"2000-01-01T00:00:00.000Z","DURATION_0":{"unit":"year","value":1},"GENERIC_ENTITY_com.spotify:playable_0":{"value":"spotify:track:3AJwUDP919kvQ9QcozQPxg","display":"Yellow"},"GENERIC_ENTITY_com.spotify:artist_0":{"value":"spotify:artist:4gzpq5DPGxSnKTe4SA8HAU","display":"Coldplay"},"GENERIC_ENTITY_com.spotify:album_0":{"value":"spotify:album:6ZG5lRT77aJ3btmArcykra","display":"Parachutes"},"QUOTED_STRING_0":"permanent wave","QUOTED_STRING_1":"pop","DATE_1":"2000-07-10T00:00:00.000Z","NUMBER_0":85,"NUMBER_1":66.10000000000001,"NUMBER_2":42.9,"NUMBER_3":50} A: >> expecting = null ==== # 71-nfc-names # names in NFC or NFD should compare identically U: \t @org.thingpedia.iot.switch(name="büro decke").set_power(power=enum on); A: I turned on your Büro Decke switch. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_action_success ; @org.thingpedia.iot.switch ( id = GENERIC_ENTITY_tt:device_id_0 ) . set_power ( power = enum on ) #[ results = [ { power = enum on , __device = GENERIC_ENTITY_tt:device_id_0 } ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"switch-office-de","display":"Büro Decke"}} A: >> expecting = null U: \t @org.thingpedia.iot.switch(name="büro decke").set_power(power=enum off); A: I turned off your Büro Decke switch for you. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_action_success ; @org.thingpedia.iot.switch ( id = GENERIC_ENTITY_tt:device_id_0 ) . set_power ( power = enum off ) #[ results = [ { power = enum off , __device = GENERIC_ENTITY_tt:device_id_0 } ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"switch-office-de","display":"Büro Decke"}} A: >> expecting = null ==== # 72-device-name-natural-language U: \t @org.thingpedia.iot.switch(name="invalid").set_power(power=enum off); A: I cannot find any invalid switch device. Which device do you want to use? A: choice 0: Bed Switch 1 A: choice 1: Bed Switch 2 A: choice 2: Kitchen Switches A: choice 3: Ceiling Switches A: choice 4: Büro Decke A: >> context = $dialogue @org.thingpedia.dialogue.transaction . execute ; @org.thingpedia.iot.switch ( name = QUOTED_STRING_0 ) . set_power ( power = enum off ) ; // {"QUOTED_STRING_0":"invalid"} A: >> expecting = choice U: kitchen A: I turned off your Kitchen Switches switch. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_action_success ; @org.thingpedia.iot.switch ( id = GENERIC_ENTITY_tt:device_id_0 ) . set_power ( power = enum off ) #[ results = [ { power = enum off , __device = GENERIC_ENTITY_tt:device_id_0 } ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"switch-kitchen","display":"Kitchen Switches"}} A: >> expecting = null ==== # 74-3rd-party-dispatch U: !! test command always bing !! A: Here is something I found on the web. A: rdl: Example 1 http://example.com A: rdl: Example 2 http://example.org A: >> context = null // {} A: >> expecting = null ==== # 75-projection-result-list-phrase U: \t @com.goal_smart.player(league_id="39"^^com.goal_smart:soccer_league("premier league")); A: Adrien Silva, M. Shabani, and A. Cresswell has scored 0, 0, and 0 goals this season. They have had 0, 0, and 8 assists. After playing 0, 0, and 0 minutes in 0, 0, and 35 appearances in the league, they had 0, 0, and 3 yellow cards and 0, 0, and 0 red cards. Adrien Silva, M. Shabani, and A. Cresswell took 0, 0, and 16 shots, 0, 0, and 4 of which were on target. They made a total of 0, 0, and 1,613 passes, 0, 0, and 58 key passes, with a passing accuracy of 0, 0, and 36 percent. Adrien Silva, M. Shabani, and A. Cresswell took 0, 0, and 9 dribble attempts, and 0, 0, and 3 of them were successful. They made 0, 0, and 31 tackles, 0, 0, and 32 interceptions, and 0, 0, and 13 blocks. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_three ; @com.goal_smart ( id = GENERIC_ENTITY_tt:device_id_0 ) . player ( league_id = GENERIC_ENTITY_com.goal_smart:soccer_league_0 ) #[ results = [ { id = GENERIC_ENTITY_com.goal_smart:soccer_player_0 , goals = 0 , assists = 0 , red_cards = 0 , yellow_cards = 0 , appearances = 0 , minutes = 0 , shots = 0 , shots_on_target = 0 , passes = 0 , key_passes = 0 , pass_accuracy = 0 , dribble_attempts = 0 , successful_dribbles = 0 , tackles = 0 , blocks = 0 , interceptions = 0 , league_id = GENERIC_ENTITY_com.goal_smart:soccer_league_0 } ] ] #[ count = 3 ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.goal_smart-9","display":"Some Device 9"},"GENERIC_ENTITY_com.goal_smart:soccer_league_0":{"value":"39","display":"premier league"},"GENERIC_ENTITY_com.goal_smart:soccer_player_0":{"value":"114","display":"Adrien Silva"}} A: >> expecting = null U: \t [dribble_attempts] of @com.goal_smart.player(league_id="39"^^com.goal_smart:soccer_league("premier league")); A: Both Adrien Silva and M. Shabani are player stats with the dribble equal to 0. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_two ; [ dribble_attempts ] of @com.goal_smart ( id = GENERIC_ENTITY_tt:device_id_0 ) . player ( league_id = GENERIC_ENTITY_com.goal_smart:soccer_league_0 ) #[ results = [ { league_id = GENERIC_ENTITY_com.goal_smart:soccer_league_0 , id = GENERIC_ENTITY_com.goal_smart:soccer_player_0 , dribble_attempts = 0 } ] ] #[ count = 3 ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.goal_smart-9","display":"Some Device 9"},"GENERIC_ENTITY_com.goal_smart:soccer_league_0":{"value":"39","display":"premier league"},"GENERIC_ENTITY_com.goal_smart:soccer_player_0":{"value":"114","display":"Adrien Silva"}} A: >> expecting = null ==== # 76-issue-695 U: \t $dialogue @org.thingpedia.dialogue.transaction.notification; U: timer(base=$now, interval=1min) U: #[results=[{ __timestamp=1626399487 }]]; # this reply is not great but this is an error case because this command # should never be generated in the first place. A: Your request was completed successfully. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_action_success ; timer ( base = $now , interval = DURATION_0 ) #[ results = [ { __timestamp = NUMBER_0 } ] ] ; // {"DURATION_0":{"unit":"min","value":1},"NUMBER_0":1626399487} A: >> expecting = null ==== # 77-clarification-question-1 U: maybe turn on the lights? A: Did you mean set on the lights? A: >> context = null // {} A: >> expecting = yesno U: yes A: You do not have a Light Bulb configured. You will need to enable Home Assistant or Philips Hue before you can use that command. A: link: Configure a new skill /devices/create A: >> context = null // {} A: >> expecting = null ==== # 78-clarification-question-2 U: maybe turn on the lights? A: Did you mean set on the lights? A: >> context = null // {} A: >> expecting = yesno U: no A: Sorry I couldn't help on that. A: >> context = null // {} A: >> expecting = null ==== # 79-reminder-notification-1 U: \t $dialogue @org.thingpedia.dialogue.transaction.notification("Say"); U: ontimer(date=[new Date(2021, 9, 30, 10, 30)]) => @org.thingpedia.builtin.thingengine.builtin.say(message="my reminder") U: #[results=[{message_output="my reminder"}]]; A: Reminder: my reminder. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_action_success ; ontimer ( date = [ DATE_0 ] ) => @org.thingpedia.builtin.thingengine.builtin . say ( message = QUOTED_STRING_0 ) #[ results = [ { message_output = QUOTED_STRING_0 } ] ] ; // {"DATE_0":"2021-09-30T17:30:00.000Z","QUOTED_STRING_0":"my reminder"} A: >> expecting = null ==== # 80-reminder-notification-2 U: \t $dialogue @org.thingpedia.dialogue.transaction.notification("Say"); U: ontimer(date=[$now + 10min]) => @org.thingpedia.builtin.thingengine.builtin.say(message="my reminder") U: #[results=[{message_output="my reminder"}]]; A: Reminder: my reminder. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_action_success ; ontimer ( date = [ $now + DURATION_0 ] ) => @org.thingpedia.builtin.thingengine.builtin . say ( message = QUOTED_STRING_0 ) #[ results = [ { message_output = QUOTED_STRING_0 } ] ] ; // {"DURATION_0":{"unit":"min","value":10},"QUOTED_STRING_0":"my reminder"} A: >> expecting = null ==== # 81-alert U: \t $dialogue @org.thingpedia.dialogue.transaction.execute; U: @org.thingpedia.builtin.thingengine.builtin.alert(); A: sound: alarm-clock-elapsed A: It is 5:50 PM. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_action_success ; @org.thingpedia.builtin.thingengine.builtin . alert ( ) #[ results = [ { time = TIME_0 } ] ] ; // {"TIME_0":{"hour":17,"minute":50,"second":0}} A: >> expecting = null ==== # 82-alert-notification U: \t $dialogue @org.thingpedia.dialogue.transaction.notification("Alert"); U: ontimer(date=[$now + 10min]) => @org.thingpedia.builtin.thingengine.builtin.alert() U: #[results=[{ time=new Time(17,50) }]]; # fixme the sound is not here due to how the test is set up, but it should play # correctly in real life A: Alert: it is 5:50 PM. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_action_success ; ontimer ( date = [ $now + DURATION_0 ] ) => @org.thingpedia.builtin.thingengine.builtin . alert ( ) #[ results = [ { time = TIME_0 } ] ] ; // {"DURATION_0":{"unit":"min","value":10},"TIME_0":{"hour":17,"minute":50,"second":0}} A: >> expecting = null ==== # 83-issue-668 U: \t @com.spotify.get_currently_playing(); A: Currently playing Hello. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_display_result ; @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . get_currently_playing ( ) #[ results = [ { id = GENERIC_ENTITY_com.spotify:song_0 , artists = [ GENERIC_ENTITY_com.spotify:artist_0 ] , album = GENERIC_ENTITY_com.spotify:album_0 , genres = [ QUOTED_STRING_0 , QUOTED_STRING_1 , QUOTED_STRING_2 ] , release_date = DATE_0 , popularity = NUMBER_0 , energy = NUMBER_1 , danceability = NUMBER_2 } ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.spotify-7","display":"Some Device 7"},"GENERIC_ENTITY_com.spotify:song_0":{"value":"spotify:track:4sPmO7WMQUAf45kwMOtONw","display":"Hello"},"GENERIC_ENTITY_com.spotify:artist_0":{"value":"spotify:artist:4dpARuHxo51G3z768sgnrY","display":"Adele"},"GENERIC_ENTITY_com.spotify:album_0":{"value":"spotify:album:0K4pIOOsfJ9lK8OjrZfXzd","display":"25"},"QUOTED_STRING_0":"british soul","QUOTED_STRING_1":"pop","QUOTED_STRING_2":"uk pop","DATE_0":"2016-06-24T00:00:00.000Z","NUMBER_0":72,"NUMBER_1":45,"NUMBER_2":48} A: >> expecting = null U: \t [artists] of @com.spotify.get_currently_playing(); A: The artist is Adele. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_display_result ; [ artists ] of @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . get_currently_playing ( ) #[ results = [ { id = GENERIC_ENTITY_com.spotify:song_0 , artists = [ GENERIC_ENTITY_com.spotify:artist_0 ] } ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.spotify-7","display":"Some Device 7"},"GENERIC_ENTITY_com.spotify:song_0":{"value":"spotify:track:4sPmO7WMQUAf45kwMOtONw","display":"Hello"},"GENERIC_ENTITY_com.spotify:artist_0":{"value":"spotify:artist:4dpARuHxo51G3z768sgnrY","display":"Adele"}} A: >> expecting = null ==== # 84-issue-668-2 U: \t [artists] of @com.spotify.get_currently_playing(); A: Currently playing Hello. The artist is Adele. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_display_result ; [ artists ] of @com.spotify ( id = GENERIC_ENTITY_tt:device_id_0 ) . get_currently_playing ( ) #[ results = [ { id = GENERIC_ENTITY_com.spotify:song_0 , artists = [ GENERIC_ENTITY_com.spotify:artist_0 ] } ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"com.spotify-7","display":"Some Device 7"},"GENERIC_ENTITY_com.spotify:song_0":{"value":"spotify:track:4sPmO7WMQUAf45kwMOtONw","display":"Hello"},"GENERIC_ENTITY_com.spotify:artist_0":{"value":"spotify:artist:4dpARuHxo51G3z768sgnrY","display":"Adele"}} A: >> expecting = null ==== # 85-opening-hours U: \t [openingHours] of @com.yelp.restaurant(), id =~ "Oren's Hummus"; A: Oren's Hummus opens from 11:00 AM to 2:30 PM every day. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_recommend_one ; [ openingHours ] of @com.yelp . restaurant ( ) filter id =~ QUOTED_STRING_0 #[ results = [ { id = GENERIC_ENTITY_com.yelp:restaurant_0 , openingHours = new RecurrentTimeSpecification ( { beginTime = TIME_0 , endTime = TIME_1 , interval = DURATION_0 } ) } ] ] ; // {"QUOTED_STRING_0":"Oren's Hummus","GENERIC_ENTITY_com.yelp:restaurant_0":{"value":"KyU7XWDPclmZ3BpdIsd_0Q","display":"Oren's Hummus"},"TIME_0":{"hour":11,"minute":0,"second":0},"TIME_1":{"hour":14,"minute":30,"second":0},"DURATION_0":{"unit":"ms","value":86400000}} A: >> expecting = null ==== # 86-reminder U: \t @org.thingpedia.builtin.thingengine.builtin.say(message="hello"); A: sound: alarm-clock-elapsed A: Str:QUOTED_STRING::42:. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_action_success ; @org.thingpedia.builtin.thingengine.builtin . say ( message = QUOTED_STRING_0 ) #[ results = [ { message = QUOTED_STRING_0 , message_output = QUOTED_STRING_1 } ] ] ; // {"QUOTED_STRING_0":"hello","QUOTED_STRING_1":"str:QUOTED_STRING::42:"} A: >> expecting = null ==== # 87-iot-confirm U: \t monitor(@org.thingpedia.iot.switch(name="kitchen").state()), state == enum on; A: Alright, I will notify you when the power state of your Kitchen Switches switch changes and it becomes true that the state is equal to on. A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_rule_enable_success ; monitor ( @org.thingpedia.iot.switch ( id = GENERIC_ENTITY_tt:device_id_0 ) . state ( ) ) filter state == enum on #[ results = [ ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"switch-kitchen","display":"Kitchen Switches"}} A: >> expecting = null