Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
crc error on custom http request
#1
I'm having trouble getting the sensor readings out for several sensors.

I'm getting crc errors:

[crc1Dcustom_url_clean
custom_url_clean]
[ready >]
[crc20custom_url_add "0","#http://192.168.178.43:8080/json.htm?type=command&param=udevice&idx=78&nval
ERROR: Bad CRC. Got 0x70, expected: 0x20
ready >]

The correct request is: 
#http://192.168.178.43:8080/json.htm?type=command&param=udevice&idx=78&nvalue=0&svalue=%TEMP%;%HUM%;0

When I test it in a browser the values are accepted by Domoticz. But the problem is not just this url, some others that give me this error:

"http://192.168.178.43:8080/json.htm?type=command&param=udevice&idx=77&svalue=%LUX%"
or
#http://192.168.178.43:8080/json.htm?type=command&param=udevice&idx=77&svalue=%LUX%

give:
[crc03custom_url_add "0","http://192.168.178.43:8080/json.htm?type=command&param=udevice&idx=78&nvalu
ERROR: Bad CRC. Got 0x26,]
[expected: 0x3

It also happens for ThingsSpeak:

"http://api.thingspeak.com/update?key=KEY123456&field1=%LUX%"

[crc42custom_url_add "1","#http://api.thingspeak.com/update?key=HKJKJHKKJHKH&field1=%TEMP%&field2
ERROR: Bad CRC. Got 0xD, expected: 0x42
ready >]

But it doesn't always happen... 

This one works:
#http://api.thingspeak.com/update?key=KJHKHKHJKH&field1=%CO2%

[crc6Dcustom_url_add "0","#http://api.thingspeak.com/update?key=HKJKJHKKJHKH&field1=%CO2%"
custom_url_add "0","#http://api.thingspeak.com/update?key=HKJKJHKKJHKH&field1=%CO2%"]
[ready >]
[crc0Dprop_set "tsKey" "HKJKJHKKJHKH"
prop_set "tsKey" "HKJKJHKKJHKH"]

But when I add a second sensor:
#http://api.thingspeak.com/update?key=GTRYU0CEFJ07P86S&field1=%CO2%&field2=%TEMP%

[crc2Acustom_url_add "0","#http://api.thingspeak.com/update?key=GTRYU0CEFJ07P86S&field1=%CO2%&field2=
ERROR: Bad CRC. Got 0x4, expected: 0x2A
ready >
sendNowCond]

So what is going one here???
I have checked the url's for correctness and they insert values into ThinkSpeak and Domoticz, but apparently something goes wrong in the sensor...

A piece of log of a working configuration for the co2 sensor:

--- Setup SENSORS ---
CO2
TEST
SI7021
Found SI7021 - Temperature/Humidity Sensor]
[BME280
BMP085]
[PM2005
CDM7160
Found CDM7160 CO2 Sensor
DS18B20
TSL2561]
[BH1750]
[APDS9960]
[--- Setup DESTINATIONS ---
CustomHTTP
SerialDump
MQTT
RFX10]
[Blynk
Heap At setup end: 34416
------State changed to: 6
sendNowCond

--- DestHanlder: sendValue --- 0
Found SI7021 - Temperature/Humidity Sensor]
[Decimal Separator is: .]
[Raw CO2: 1095]
[ready >
Completed in: 7643ms
Going into power-safe mode for 30 seconds]
[8EpÈ 0,JYø0xCÉüø]
[„•…ÁHeap at start: 37392
Device will go to Deep Sleep mode, once data is sent. Press [Enter] to abort

vESPrino v1.16 build20170103
IP address: 0.0.0.0
Chip ID: D544BE
ready >
Waiting for auto-connect
I2C Bus on SDA:SCA (14:5)
--- Setup PLUGINS ---
Neopixel
DweetIO
WebServer
WebSocketServer
PowerManager
GPIO
Servo
Annemometer
TimerManager

--- Setup SENSORS ---
CO2
TEST
SI7021
Found SI7021 - Temperature/Humidity Sensor]
[BME280
BMP085]
[PM2005
CDM7160
Found CDM7160 CO2 Sensor
DS18B20
TSL2561]
[BH1750]
[APDS9960

--- Setup DESTINATIONS ---
CustomHTTP
SerialDump
MQTT
RFX10
Blynk
Heap At setup end: 34416
------State changed to: 6
sendNowCond

--- DestHanlder: sendValue --- 0
Found SI7021 - Temperature/Humidity Sensor]
[Decimal Separator is: .]
[Raw CO2: 1102]
[ready >
Completed in: 7650ms
Going into power-safe mode for 30 seconds]
[ÈdOX¸<$RZøðCZÔÍ]
[„•…ÁHeap at start: 37392
Device will go to Deep Sleep mode, once data is sent. Press [Enter] to abort

vESPrino v1.16 build20170103
IP address: 0.0.0.0
Chip ID: D544BE
ready >
Waiting for auto-connect
I2C Bus on SDA:SCA (14:5)
--- Setup PLUGINS ---
Neopixel
DweetIO
WebServer
WebSocketServer
PowerManager
GPIO
Servo
Annemometer
TimerManager

--- Setup SENSORS ---
CO2
TEST
SI7021
Found SI7021 - Temperature/Humidity Sensor
BME280
BMP085]
[PM2005
CDM7160
Found CDM7160 CO2 Sensor
DS18B20
TSL2561]
[BH1750]
[APDS9960

--- Setup DESTINATIONS ---
CustomHTTP
SerialDump
MQTT
RFX10]
[Blynk
Heap At setup end: 34416
------State changed to: 6
sendNowCond

--- DestHanlder: sendValue --- 1
Found SI7021 - Temperature/Humidity Sensor]
[Decimal Separator is: .]
[Raw CO2: 1100]
[CustomHTTPDest::process
SerialDumpDest::process
IP : 0.0.0.0
CHIPID : D544BE
RUNTIME : 694
TEMP : 19.89
TEMPR : 19.89
HUM : 42
CO2 : 1092
CO2R : 1100
MQTTDest::process]
[RFDest::process
ready >
Completed in: 7915ms
Going into power-safe mode for 30 seconds]
[DtIÙ0G,Àü4xBøü]
[„•…ÁHeap at start: 37392]
[Device will go to Deep Sleep mode, once data is sent. Press [Enter] to abort]
[vESPrino v1.16 build20170103
IP address: 0.0.0.0
Chip ID: D544BE
ready >
Waiting for auto-connect]
[meter]
[crc1Dcustom_url_clean
custom_url_clean
ERROR: Command not recognized
ready >
TimerManager

--- Setup SENSORS ---
CO2
TEST
SI7021
Found SI7021 - Temperature/Humidity Sensor]
[]
[crc6Dcustom_url_add "0","#http://api.thingspeak.com/update?key=GTRYU0CEFJ07P86S&field1=%CO2%"
custom_url_add "0","#http://api.thingspeak.com/update?key=GTRYU0CEFJ07P86S&field1=%CO2%"
ERROR: Command not recognized
ready >
BMP085]
[crc0Dprop_set "tsKey" "GTRYU0CEFJ07P86S"
prop_set "tsKey" "GTRYU0CEFJ07P86S"]
[ready >
PM2005]
[CDM7160
Found CDM7160 CO2 Sensor
DS18B20
TSL2561]
[BH1750]
[APDS9960

--- Setup DESTINATIONS ---
CustomHTTP
SerialDump
MQTT
RFX10
Blynk
Heap At setup end: 34416
------State changed to: 6
sendNowCond

--- DestHanlder: sendValue --- 0
Found SI7021 - Temperature/Humidity Sensor]
[Decimal Separator is: .]
[Raw CO2: 1099
ready >
------State changed to: 3
IP address: 192.168.178.25 in 8120 ms
GOT IP]
[sendNowCond]
[--- DestHanlder: sendValue --- 0
Found SI7021 - Temperature/Humidity Sensor]
[Raw CO2: 1099]
[ready >]
[sendNowCond

--- DestHanlder: sendValue --- 0
Found SI7021 - Temperature/Humidity Sensor]
[Raw CO2: 1097]
[ready >]
[crc71nop
ready >]
[crc1Dcustom_url_clean
custom_url_clean]
[ready >]
[crc6Dcustom_url_add "0","#http://api.thingspeak.com/update?key=GTRYU0CEFJ07P86S&field1=%CO2%"
custom_url_add "0","#http://api.thingspeak.com/update?key=GTRYU0CEFJ07P86S&field1=%CO2%"]
[ready >]
[crc0Dprop_set "tsKey" "GTRYU0CEFJ07P86S"
prop_set "tsKey" "GTRYU0CEFJ07P86S"]
[ready >]
[sendNowCond]
[--- DestHanlder: sendValue --- 1
Found SI7021 - Temperature/Humidity Sensor]
[Raw CO2: 1097]
[CustomHTTPDest::process
Calling HTTP: [http://api.thingspeak.com/update?key=GTRYU0CEFJ07P86S&field1=1099]]
[Response Code: 200
CLOSED
Response Code: 200
SerialDumpDest::process
IP : 192.168.178.25
CHIPID : D544BE
RUNTIME : 831
TEMP : 20.10
TEMPR : 20.10
HUM : 41
CO2 : 1099
CO2R : 1097
MQTTDest::process]
[RFDest::process
ready >]
[sendNowCond]
[--- DestHanlder: sendValue --- 0
Found SI7021 - Temperature/Humidity Sensor]
[Raw CO2: 1099]
[ready >]
[sendNowCond]
[--- DestHanlder: sendValue --- 0
Found SI7021 - Temperature/Humidity Sensor]
[Raw CO2: 1105]
[ready >]
[sendNowCond]
[--- DestHanlder: sendValue --- 0
Found SI7021 - Temperature/Humidity Sensor]
[Raw CO2: 1099]
[ready >]

A bit of log that doesn't work...

--- Setup DESTINATIONS ---
CustomHTTP
SerialDump
MQTT
RFX10]
[Blynk
Heap At setup end: 34416
------State changed to: 6
sendNowCond

--- DestHanlder: sendValue --- 1
Found SI7021 - Temperature/Humidity Sensor
Decimal Separator is: .]
[Raw CO2: 1107]
[CustomHTTPDest::process
Calling HTTP: [http://api.thingspeak.com/update?key=GTRYU0CEFJ07P86S&field1=1105]
Response Code: 200
CLOSED
Response Code: 200
SerialDumpDest::process
IP : 0.0.0.0
CHIPID : D544BE
RUNTIME : 1243
TEMP : 20.42
TEMPR : 20.42
HUM : 40
CO2 : 1105
CO2R : 1107
MQTTDest::process
RFDest::process
ready >
Completed in: 8475ms
Going into power-safe mode for 30 seconds]
[¶AÌièE¶LØ@x:Ùðú„•…ÁHeap at start: 37392
Device will go to Deep Sleep mode, once data is sent. Press [Enter] to abort

vESPrino v1.16 build20170103
IP address: 0.0.0.0
Chip ID: D544BE
ready >
Waiting for auto-connect]
[I2C Bus on SDA:SCA (14:5)
--- Setup PLUGINS ---
Neopixel
DweetIO
WebServer
WebSocketServer
PowerManager
GPIO
Servo
Annemometer
TimerManager

--- Setup SENSORS ---
CO2
TEST
SI7021
Found SI7021 - Temperature/Humidity Sensor
BME280]
[BMP085
PM2005
CDM7160
Found CDM7160 CO2 Sensor
DS18B20
TSL2561]
[BH1750
APDS9960

--- Setup DESTINATIONS ---
CustomHTTP
SerialDump
MQTT
RFX10
Blynk]
[Heap At setup end: 34416
------State changed to: 6
sendNowCond

--- DestHanlder: sendValue --- 0
Found SI7021 - Temperature/Humidity Sensor
Decimal Separator is: .]
[Raw CO2: 1107]
[ready >
Completed in: 7772ms
Going into power-safe mode for 30 seconds]
[¶PÙ4@ðlØ _Iñø]
[„•…ÁHeap at start: 37392]
[Device will go to Deep Sleep mode, once data is sent. Press [Enter] to abort]
[vESPrino v1.16 build20170103
IP address: 0.0.0.0
Chip ID: D544BE
ready >
Waiting for auto-connect]
[I2C Bus on SDA:SCA (14:5)
--- Setup PLUGINS ---
Neopixel
DweetIO
WebServer
WebSocketServer
PowerManager
GPIO
Servo
Annemometer
TimerManager

--- Setup SENSORS ---
CO2
TEST
SI7021
Found SI7021 - Temperature/Humidity Sensor]
[BME280]
[BMP085]
[PM2005]
[CDM7160
Found CDM7160 CO2 Sensor
DS18B20
TSL2561]
[BH1750
APDS9960

--- Setup DESTINATIONS ---
CustomHTTP
SerialDump
MQTT
RFX10]
[Blynk
Heap At setup end: 34416
------State changed to: 6
sendNowCond

--- DestHanlder: sendValue --- 0
Found SI7021 - Temperature/Humidity Sensor
Decimal Separator is: .]
[Raw CO2: 1112]
[ready >
Completed in: 7755ms
Going into power-safe mode for 30 seconds]
[ÈdOY¸,ÒÒZøìh`¦þÿ]
[„•…ÁHeap at start: 37392]
[Device will go to Deep Sleep mode, once data is sent. Press [Enter] to abort

vESPrino v1.16 build20170103
IP address: 0.0.0.0
Chip ID: D544BE
ready >
Waiting for auto-connect
I2C Bus on SDA:SCA (14:5)
--- Setup PLUGINS ---
Neopixel
DweetIO
WebServer
WebSocketServer
PowerManager
GPIO
Servo
Annemometer
TimerManager

--- Setup SENSORS ---
CO2
TEST
SI7021
Found SI7021 - Temperature/Humidity Sensor
BME280]
[BMP085
PM2005
CDM7160
Found CDM7160 CO2 Sensor
DS18B20
TSL2561]
[BH1750
APDS9960

--- Setup DESTINATIONS ---
CustomHTTP
SerialDump
MQTT
RFX10]
[Blynk
Heap At setup end: 34416
------State changed to: 6
sendNowCond

--- DestHanlder: sendValue --- 0
Found SI7021 - Temperature/Humidity Sensor
Decimal Separator is: .]
[Raw CO2: 1115]
[ready >
Completed in: 7761ms
Going into power-safe mode for 30 seconds]
[ÈDðI˜¤ÒXøìxB¦üü]
[„•…ÁHeap at start: 37392]
[Device will go to Deep Sleep mode, once data is sent. Press [Enter] to abort]
[vESPrino v1.16 build20170103
IP address: 0.0.0.0
Chip ID: D544BE
ready >
Waiting for auto-connect]
[I2C Bus on SDA:SCA (14:5)
--- Setup PLUGINS ---
Neopixel
DweetIO
WebServer
WebSocketServer
PowerManager
GPIO
Servo
Annemometer
TimerManager

--- Setup SENSORS ---
CO2
TEST
SI7021
Found SI7021 - Temperature/Humidity Sensor]
[BME280]
[BMP085]
[PM2005]
[CDM7160
Found CDM7160 CO2 Sensor
DS18B20
TSL2561]
[BH1750]
[APDS9960]
[--- Setup DESTINATIONS ---
CustomHTTP
SerialDump
MQTT
RFX10]
[Blynk
Heap At setup end: 34416
------State changed to: 6
sendNowCond

--- DestHanlder: sendValue --- 1
Found SI7021 - Temperature/Humidity Sensor]
[Decimal Separator is: .]
[Raw CO2: 1119]
[CustomHTTPDest::process
Calling HTTP: [http://api.thingspeak.com/update?key=GTRYU0CEFJ07P86S&field1=1112]]
[Response Code: 200
CLOSED
Response Code: 200
SerialDumpDest::process
IP : 0.0.0.0
CHIPID : D544BE
RUNTIME : 1395
TEMP : 20.46
TEMPR : 20.46
HUM : 40
CO2 : 1112
CO2R : 1119
MQTTDest::process]
[RFDest::process
ready >
Completed in: 8450ms
Going into power-safe mode for 30 seconds]
Reply


Messages In This Thread
crc error on custom http request - by jant80 - 01-20-2017, 04:22 PM
RE: crc error on custom http request - by admin - 01-20-2017, 06:54 PM
RE: crc error on custom http request - by jant80 - 01-20-2017, 07:23 PM
RE: crc error on custom http request - by admin - 01-22-2017, 04:00 AM
RE: crc error on custom http request - by jant80 - 01-22-2017, 09:38 AM
RE: crc error on custom http request - by admin - 01-22-2017, 11:03 AM
RE: crc error on custom http request - by admin - 01-23-2017, 02:20 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)