cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1071
Views
5
Helpful
3
Replies

Jabber Bot, helloworld example - demobot01 is offline

peterbailey
Level 1
Level 1

Hello. I'm a newbie to this site and jabber etc. I am trying to build some jabber bots. I am using the sandbox and following the helloworld example. I am using the js code from the example, and it executes correctly and tells me that demobot01 is connected. When I RDP into the jabber windows client to test and converse with the bot, it says that demobot01 is offline.

 

Not sure if I missed something or what. The example looks simple, and if the demobot01 was online, I could go ahead and start testing things. 

 

Anyone know what is happening here? Any help with this greatly appreciated.

Thanks,

Peter

 

1 Accepted Solution

Accepted Solutions

zowu
Cisco Employee
Cisco Employee

Hi Peter,

 

The time in jabberbot host didn't sync with domain controller, and that's the reason why it cannot be online. I've corrected it and the bot is working now. 

 

Besides, we've moved the weather service module to "weather-js" since Yahoo weather API was retried in this Jan. Please check the updated code in jabber_bot.js.

 

Thanks,

Bob

 

Screen Shot 2019-04-05 at 6.00.51 PM.png

View solution in original post

3 Replies 3

zowu
Cisco Employee
Cisco Employee

Hi Peter,

 

The time in jabberbot host didn't sync with domain controller, and that's the reason why it cannot be online. I've corrected it and the bot is working now. 

 

Besides, we've moved the weather service module to "weather-js" since Yahoo weather API was retried in this Jan. Please check the updated code in jabber_bot.js.

 

Thanks,

Bob

 

Screen Shot 2019-04-05 at 6.00.51 PM.png

Thanks Bob, working for me know. Appreciate the help :-)

 

Hi, i tried it today, it is not working. 

when i make demobot1 online, with the command "node jabber_bot.js", it says "I am connected".

I saw that available from jabber too. 

when i type "weather chicago" or hi, it goes offline and in the demobot1 - gives out this error:

cisco@chatbot:~/botkit/examples$ node jabber_bot.js
Initializing Botkit v0.6.7
info: ** Using simple storage. Saving data to ./bot_store/
Connected with JID: demobot01
Yes, I'm connected!
/home/cisco/botkit/examples/jabber_bot.js:28
if (entities!=null) city = entities[0].entity;
^

TypeError: Cannot read property 'entity' of undefined
at /home/cisco/botkit/examples/jabber_bot.js:28:96
at /home/cisco/botkit/lib/CoreBot.js:1104:32
at next (/home/cisco/botkit/node_modules/ware/lib/index.js:82:27)
at Ware.run (/home/cisco/botkit/node_modules/ware/lib/index.js:88:3)
at Object.<anonymous> (/home/cisco/botkit/lib/CoreBot.js:1103:49)
at Object.Botkit.botkit.trigger (/home/cisco/botkit/lib/CoreBot.js:1147:47)
at /home/cisco/botkit/lib/JabberBot.js:95:32
at /home/cisco/botkit/lib/CoreBot.js:1158:56
at next (/home/cisco/botkit/node_modules/ware/lib/index.js:82:27)
at Ware.run (/home/cisco/botkit/node_modules/ware/lib/index.js:88:3)
cisco@chatbot:~/botkit/examples$