Device displaying as wrong type
Posted: Friday 02 November 2018 19:47
by JoshDinsdale
Hi Guys
Im nearly there with my Dashticz implementation, however I am experiencing a weird issue.
For some reason my energy usage devices is showing as a switch with a status of on, rather than showing the current and/or total usage.
My config follows:

Josh
Im nearly there with my Dashticz implementation, however I am experiencing a weird issue.
For some reason my energy usage devices is showing as a switch with a status of on, rather than showing the current and/or total usage.
My config follows:
- Spoiler: show
-
var config = {}
config['domoticz_ip'] = 'http://192.168.7.12:8080';
config['user_name'] = 'XXXXX';
config['pass_word'] = 'XXXX';
config['app_title'] = 'Home';
config['room_plan'] = '0';
config['domoticz_refresh'] = '5';
config['dashticz_refresh'] = '60';
config['default_news_url'] = 'http://feeds.bbci.co.uk/news/uk/rss.xml';
config['news_scroll_after'] = '20';
config['default_cors_url'] = 'https://cors-anywhere.herokuapp.com/';
config['dashticz_php_path'] = 'http://192.168.7.12/dashticz_v2.beta/vendor/dashticz/'; config['theme'] = 'default'; config['background_image'] = 'img/bg12.jpg';
config['standby_after'] = '0';
config['auto_swipe_back_to'] = '1';
config['auto_swipe_back_after'] = '10'; config['auto_slide_pages'] = '';
config['slide_effect'] = 'slide';
config['standard_graph'] = 'day';
config['language'] = 'en_US'; config['timeformat'] = 'DD-MM-YY HH:mm';
config['calendarformat'] = 'dd DD.MM HH:mm';
config['calendarlanguage'] = 'en_US';
config['boss_stationclock'] = 'RedBoss';
config['gm_api'] = '';
config['gm_zoomlevel'] = '';
config['gm_latitude'] = '';
config['gm_longitude'] = '';
config['speak_lang'] = 'en-US';
config['wu_api'] = '';
config['wu_city'] = 'Amsterdam';
config['wu_name'] = '';
config['wu_country'] = 'NL';
config['owm_api'] = '906ec7ce2b2f6bd715ddebc319f39138';
config['owm_city'] = 'East Cowes';
config['owm_name'] = 'Newport';
config['owm_country'] = 'GB';
config['idx_moonpicture'] = '';
config['switch_horizon'] = '';
config['host_nzbget'] = '';
config['spot_clientid'] = '';
config['sonarr_url'] = '';
config['sonarr_apikey'] = '';
config['sonarr_maxitems'] = '';
config['google_api_key'] = '';
/* config['garbage_company'] = '';
config['garbage_icalurl'] = '';
config['garbage_calendar_id'] = '';
config['garbage_zipcode'] = '';
config['garbage_street'] = '';
config['garbage_housenumber'] = '';
config['garbage_housenumberadd'] = '';
config['garbage_maxitems'] = '';
config['garbage_width'] = '';
config['garbage_hideicon'] = 0;
config['garbage_icon_use_colors'] = 1;
config['garbage_use_colors'] = 0;
config['garbage_use_names'] = 0;
config['garbage_use_cors_prefix'] = 1;
*/
config['loginEnabled'] = 0;
config['disable_update_check'] = 0;
config['no_rgb'] = 0;
config['auto_positioning'] = 0;
config['use_favorites'] = 1;
config['disable_googleanalytics'] = 0;
config['last_update'] = 0;
config['hide_topbar'] = 1;
config['security_button_icons'] = 0;
config['edit_mode'] = 0;
config['hide_seconds'] = 0;
config['hide_seconds_stationclock'] = 0;
config['use_fahrenheit'] = 0;
config['use_beaufort'] = 0;
config['translate_windspeed'] = 1;
config['static_weathericons'] = 0;
config['hide_mediaplayer'] = 0;
var calendars = {}
calendars.private = { maxitems: 1, icalurl: 'XXXXXXXX' }
/* BLOCKS CONFIGURATION */
var blocks = {}
blocks['bt_1'] = {}
blocks['bt_1']['type'] = 'blocktitle';
blocks['bt_1']['title'] = 'Lights';
blocks['bt_2'] = {}
blocks['bt_2']['type'] = 'blocktitle';
blocks['bt_2']['title'] = 'Weather';
blocks['bt_3'] = {}
blocks['bt_3']['type'] = 'blocktitle';
blocks['bt_3']['title'] = 'Power Usage';
blocks['bt_4'] = {}
blocks['bt_4']['type'] = 'blocktitle';
blocks['bt_4']['title'] = 'Status';
blocks['bt_5'] = {}
blocks['bt_5']['type'] = 'blocktitle';
blocks['bt_5']['title'] = 'Kids Jobs';
//Front Door
blocks[436] = {};
blocks[436]['title'] = 'Front Door';
blocks[436]['show_lastupdate'] = false;
blocks[436]['width'] = 6;
//Kitchen Window
blocks[456] = {};
blocks[456]['title'] = 'Kitchen Window';
blocks[456]['show_lastupdate'] = false;
blocks[456]['width'] = 6;
//Living Room Window
blocks[458] = {};
blocks[458]['title'] = 'Living Room Window';
blocks[458]['show_lastupdate'] = false;
blocks[458]['width'] = 6;
//Toilet Window
blocks[457] = {};
blocks[457]['title'] = 'Toilet Window';
blocks[457]['show_lastupdate'] = true;
blocks[457]['width'] = 6;
//* TEMPS *//
blocks['252_1'] = {};
blocks['252_1']['title'] = 'Hallway';
blocks['252_1']['switch'] = false;
blocks['252_1']['width'] = 7;
blocks['318_1'] = {};
blocks['318_1']['title'] = 'Server Cupboard';
blocks['318_1']['switch'] = false;
blocks['318_1']['width'] = 7;
blocks['349_1'] = {};
blocks['349_1']['title'] = 'Garden';
blocks['349_1']['switch'] = false;
blocks['349_1']['width'] = 7;
blocks['461_1'] = {};
blocks['461_1']['title'] = 'Crab Tank';
blocks['461_1']['switch'] = false;
blocks['461_1']['width'] = 7;
//* Lights *//
//Hallway Light
blocks[446] = {};
blocks[446]['title'] = 'Hallway Light';
blocks[446]['show_lastupdate'] = false;
//Living Room 1
blocks[445] = {};
blocks[445]['title'] = 'Living Room - TV Area';
blocks[445]['show_lastupdate'] = false;
//Landing Light
blocks[161] = {};
blocks[161]['title'] = 'Landing Light';
blocks[161]['show_lastupdate'] = false;
//Girls Room Light
blocks[165] = {};
blocks[165]['title'] = 'Girls Room Light';
blocks[165]['show_lastupdate'] = false;
//Vincents Room Light
blocks[166] = {};
blocks[166]['title'] = 'Vincents Room Light';
blocks[166]['show_lastupdate'] = false;
//* Scenes *//
//Scene Upstairs Lights
blocks['s1'] = {};
blocks['s1']['title'] = 'Upstairs Lights';
blocks['s1']['show_lastupdate'] = false;
blocks['s1']['width'] = 4;
blocks['s1']['hide_data'] = true;
//Scene Downstairs Lights
blocks['s5'] = {};
blocks['s5']['title'] = 'Downstairs Lights';
blocks['s5']['show_lastupdate'] = false;
blocks['s5']['width'] = 4;
blocks['s5']['hide_data'] = true;
//Scene All Lights
blocks['s3'] = {};
blocks['s3']['title'] = 'All Lights';
blocks['s3']['show_lastupdate'] = false;
blocks['s3']['width'] = 4;
blocks['s3']['hide_data'] = true;
/* Energy */
/* Current Energy Usage */
blocks[8] = {};
/* Total Energy Usage */
blocks[16] = {};
/* COLUMN CONFIGURATION */
var columns = {}
columns['bar'] = {};
columns['bar']['blocks'] = ['sunrise','miniclock','settings'];
columns[1] = {};
columns[1]['blocks'] = ['clock','sunrise',436,456,458,457,'bt_5',calendars.private];
columns[1]['width'] = 3;
columns[2] = {};
columns[2]['blocks'] = ['bt_1',166,165,161,446,445,'s3','s5','s1'];
columns[2]['width'] = 5;
columns[3] = {};
columns[3]['blocks'] = ['bt_2','currentweather_big','weather_owm','252_1','318_1','349_1','461_1','bt_3',8,16];
columns[3]['width'] = 4;
var columns_standby = {}
columns_standby[1] = {}
columns_standby[1]['blocks'] = ['clock','weather', 'currentweather_big']
columns_standby[1]['width'] = 12;

Josh