diff --git a/handlers.js b/handlers.js
index a6aba9d..a4ebbb9 100644
--- a/handlers.js
+++ b/handlers.js
@@ -81,6 +81,7 @@ function homepage(res, req) {
+ '
'
+ 'Photos
'
@@ -91,6 +92,16 @@ function homepage(res, req) {
+ 'snapshot_get, snapshot_get(thumbnail)'
+ 'clear_snapshots'
+ ''
+ + 'RFID
'
+ + ''
+ + 'Misc.
'
+ + ''
+ 'Apps
'
+ ''
+ '- clock, clock(12)
'
@@ -565,6 +576,16 @@ function clear_cache(res, req) {
}
exports.clear_cache = clear_cache;
+function display_cache(res, req) {
+ log.trace('display_cache: begin');
+
+ var data = '{"cache":[{"id":"6fcfe1b9dfc7fe6d3df40872d36f43ac","text":"bonjour lapin","voice":"margaux"}],"return":"0"}';
+
+ sendResponse(res, data);
+ log.trace('display_cache: end');
+}
+exports.display_cache = display_cache;
+
function clear_snapshots(res, req) {
log.trace('clear_snapshots: begin');
@@ -575,6 +596,32 @@ function clear_snapshots(res, req) {
}
exports.clear_snapshots = clear_snapshots;
+function rfid_list(res, req) {
+ log.trace('rfid_list: begin');
+
+ var data = '{"tags":['
+ + '{"id":"D0021A35038F0CD2","type":"1","color":"4","cmd":"0","var":"-1","name":"" },'
+ + '{ "id":"D0021A3506196568","type":"1","color":"3","cmd":"3","var":"-1","name":"Radio"}'
+ + '],"return":"0"}';
+
+ sendResponse(res, data);
+ log.trace('rfid_list: end');
+}
+exports.rfid_list = rfid_list;
+
+function rfid_list_ext(res, req) {
+ log.trace('rfid_list_ext: begin');
+
+ var data = '{"tags":['
+ + '{"id":"D0021A35038F0CD2","type":"1","type_name":"FLATANOZ","color":"4","color_name":"JAUNE"},'
+ + '{"id":"D0021A3506196568","type":"1","type_name":"FLATANOZ","color":"3","color_name":"VERT"}'
+ + '],"return":"0"}';
+
+ sendResponse(res, data);
+ log.trace('rfid_list_ext: end');
+}
+exports.rfid_list_ext = rfid_list_ext;
+
function clock(res, req) {
log.trace('clock: begin');
@@ -618,3 +665,31 @@ function moods(res, req) {
log.trace('moods: end');
}
exports.moods = moods;
+
+function moods_list(res, req) {
+ log.trace('moods_list: begin');
+
+ // Only the first 5
+ var data = '{"moods":['
+ + '{"id":"1","text":"Ronflements"},'
+ + '{"id":"2","text":"Bâillement"},'
+ + '{"id":"3","text":"Eternuement Pardon !"},'
+ + '{"id":"4","text":"Arracher les orties."},'
+ + '{"id":"5","text":"Bonjour ! Je suis un lapin, je suis gentil. Ha ha ha ha…"}'
+ + '],"return":"0"}';
+
+ sendResponse(res, data);
+ log.trace('moods_list: end');
+}
+exports.moods_list = moods_list;
+
+function stories_list(res, req) {
+ log.trace('stories_list: begin');
+
+ var data = '{"stories":[],"return":"0"}';
+
+ sendResponse(res, data);
+ log.trace('stories_list: end');
+}
+exports.stories_list = stories_list;
+
diff --git a/index.js b/index.js
index 3b5ef73..195d639 100644
--- a/index.js
+++ b/index.js
@@ -39,6 +39,7 @@ handle['/cgi-bin'] = handlers.homepage;
// API
handle['/cgi-bin/clear_cache'] = handlers.clear_cache;
handle['/cgi-bin/clear_snapshots'] = handlers.clear_snapshots;
+handle['/cgi-bin/display_cache'] = handlers.display_cache;
handle['/cgi-bin/ears'] = handlers.ears;
handle['/cgi-bin/ears_mode'] = handlers.ears_mode;
handle['/cgi-bin/ears_random'] = handlers.ears_random;
@@ -46,9 +47,12 @@ handle['/cgi-bin/ears_reset'] = handlers.ears_reset;
handle['/cgi-bin/get_free_space'] = handlers.get_free_space;
handle['/cgi-bin/get_version'] = handlers.get_version;
handle['/cgi-bin/leds'] = handlers.leds;
+handle['/cgi-bin/moods_list'] = handlers.moods_list;
handle['/cgi-bin/radios_list'] = handlers.radios_list;
handle['/cgi-bin/reboot'] = handlers.reboot;
handle['/cgi-bin/reset_install_flag'] = handlers.reset_install_flag;
+handle['/cgi-bin/rfid_list'] = handlers.rfid_list;
+handle['/cgi-bin/rfid_list_ext'] = handlers.rfid_list_ext;
handle['/cgi-bin/sleep'] = handlers.sleep;
handle['/cgi-bin/snapshot'] = handlers.snapshot;
handle['/cgi-bin/snapshot_ftp'] = handlers.snapshot_ftp;
@@ -58,6 +62,7 @@ handle['/cgi-bin/sound'] = handlers.sound;
handle['/cgi-bin/sound_control'] = handlers.sound_control;
handle['/cgi-bin/sound_list'] = handlers.sound_list;
handle['/cgi-bin/status'] = handlers.status;
+handle['/cgi-bin/stories_list'] = handlers.stories_list;
handle['/cgi-bin/tts'] = handlers.tts;
handle['/cgi-bin/voice_list'] = handlers.voice_list;
handle['/cgi-bin/wakeup'] = handlers.wakeup;