edfungus/Crouton

Maybe not compatible with my device.

ethersloth opened this issue · 3 comments

When using Crouton I'm able to connect to my broker no problem but I'm not able to get Crouton to connect to my device. Please bear with me as I am still new to this. It 's my thinking that Crouton doesn't like what I put out in my deviceInfo topic

[root@localhost ~]# mosquitto_sub -h localhost -t "outbox/deviceInfo/662X50879610058"
{"ts":"2018-09-27T18:45:46Z","d":{"unitTemp":42.43}}
{"ts":"2018-09-27T18:46:45Z","d":{"unitName":"Greg-Ram-6021","serialNumber":"662X50879610058","model":"RAM-6021","version":"4.29","cellIp":"","upTime":683586,"versionLong":"4.29.190.0","pwr":23.84,"unitTemp":42.25,"hostName":"Greg-Ram-6021","intInfo":"lo=127.0.0.1;usb0=192.168.111.1;eth0=192.168.31.122;eth1=192.168.3.1;tun0=10.8.0.2;","cellFirmVer":"","cellFirmNum":"","imei":"","mdn":"","simID":"","imsi":"","cellServType":"","plmn":"","cellChan":0,"wsSig":0,"rssi":0,"ecio":0,"rsrp":0,"rsrq":0,"cellUpTime":0,"cellModTemp":0,"apn":"","dataDay":0,"dataMonth":0,"rxMonth":0,"txMonth":0,"mcc":"","mnc":"","lac":"","cellID":"","smsSent":0,"smsRecieved":0,"gpsAltitude":0,"gpsTime":0,"gpsNumOfSat":0,"gpsFtFromCp":0,"gpsSpeed":0,"gpsCourse":0}}

My assumption is crouton is looking for name, not unitName, is that correct?

Yes, the deviceInfo must follow the spec given in the readme. While it can have more fields, it should have the minimum fields name, endPoints, description and status.

Is there anyway to modify this to work with what my device outputs. (longshot I know)?

Unfortunately not because Crouton needs that information to work properly. If not provided, Crouton doesn't know how to interact with your device. For example, Crouton wouldn't know what type of card to show for the properties in your json say gpsSpeed. And if gpsSpeed can be controlled, Crouton wouldn't know the range of the slider for the accepted range of gpsSpeed.