Closed Stephan35 closed 6 years ago
Here is a sample to send a value ... i miss something
Here is error from log :
void sendLUX(){
McMessage _message;
_message.update(BC_SENSOR, C_INTERNAL, SENSOR_LUXMETRE);
char _luxmeter[21];
snprintf_P(_luxmeter, 20, "%d Lux", analogRead(A0));
send(_message.set(_luxmeter));
}
2017-02-22 23:59:15,841 ERROR [Thread-6] [org.mycontroller.standalone.message.MessageMonitorThread:119] Throws exception while processing!, [RawMessage(gatewayId=1, data=65535 Lux, subData=out_esp/ESP_8C0125/SENSOR_BC/C_INTERNAL/LUXMETRE/0, isTxMessage=false, networkType=MY_CONTROLLER, timestamp=1487804355771)]
java.lang.IllegalArgumentException: No enum constant org.mycontroller.standalone.message.McMessageUtils.MESSAGE_TYPE_INTERNAL.LUXMETRE
Maybe i get it false with out_esp/ESP_8C0125/SENSOR_BC/C_INTERNAL/LUXMETRE/0
Will have a look in mqtt datagram to see what is waiting for ... in progress .
@Stephan35 I have added an example. https://github.com/mycontroller-org/MyControllerDevice/blob/master/examples/RelayActuatorAndTemperature/RelayActuatorAndTemperature.ino
@jkandasa Thanks for this example. Is it possible to have an explanation for kind of device and wich kind of data is required , example:
#define S_LIGHT "S_LIGHT" // For ?
#define V_LIGHT "V_LIGHT" // For ?
What is difference between S_LIGHT and V_LIGHT , how can i know this .
S for string return ? V for value return ? I_ for ?
is it possible tu put a comment in front of each one in McMessage.h
Thanks. Best regards
@Stephan35 updated!
Can i please see the complete example for the light sensor? That would be very helpful :)
@njbuch do you want to see LDR example?
No, I have it working now. Thanks anyway!
Hello, Now my esp can talk with MyController, could you post or help for sending data from esp to MyController with this lib.
First i tried to set luxmeter with this :
I don't know how to send value to MyController
In the same way , i would like to send state fo some binary input ...
Thanks