Hello,
This is doing my nut in.
I am reading from a string a value and I want to update that into my temperature dummy sensor.
I have a string "temperature" which reads in a value from a position in the string at j to i-1
local temperature=string.sub(XML_string,j,i-1)
I then update my variable at idx 108
commandArray = {}
This works:
commandArray['UpdateDevice'] = "108|0|25.20"
but this doesn't which is what I want:
commandArray['UpdateDevice'] = "108|0|..temperature
When I test it with
print ("temp= "..temperature.." length= "..z)
I get the right number (i.e. 25.20) with the correct length printed in the log.
What am I doing wrong or how can I debug further?
Thanks!
Problem updating a device.
Moderator: leecollings
- RATA1
- Posts: 19
- Joined: Tuesday 08 December 2015 15:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Taunton, UK
- Contact:
Problem updating a device.
Pi + RFX433 + AEOTEC Gen5 ZWave + HGI80 + CM180i + sensors
SolarEdge Inverter and PVOutput
SolarEdge Inverter and PVOutput
- Westcott
- Posts: 423
- Joined: Tuesday 09 December 2014 17:04
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: UK - Glos
- Contact:
Re: Problem updating a device.
Do you mean -
commandArray['UpdateDevice'] = "108|0|"..temperature
commandArray['UpdateDevice'] = "108|0|"..temperature
Zwave - Sigma Z+ stick, Fibaro, Horstmann, Neo Coolcam, EUROtronic
RFlink - IR detectors and temperatures
Wifi - YeeLights, ESP32s, Anoop sockets
Zigbee - lots with zigbee2mqtt and ZbBridge
RFlink - IR detectors and temperatures
Wifi - YeeLights, ESP32s, Anoop sockets
Zigbee - lots with zigbee2mqtt and ZbBridge
- RATA1
- Posts: 19
- Joined: Tuesday 08 December 2015 15:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Taunton, UK
- Contact:
Re: Problem updating a device.
Fixed it - dodgy eyes!!
had
commandArray['UpdateDevice'] = "108|0|..temperature
needed
commandArray['UpdateDevice'] = "108|0|"..temperature
Doh!
had
commandArray['UpdateDevice'] = "108|0|..temperature
needed
commandArray['UpdateDevice'] = "108|0|"..temperature
Doh!
Pi + RFX433 + AEOTEC Gen5 ZWave + HGI80 + CM180i + sensors
SolarEdge Inverter and PVOutput
SolarEdge Inverter and PVOutput
- RATA1
- Posts: 19
- Joined: Tuesday 08 December 2015 15:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Taunton, UK
- Contact:
Re: Problem updating a device.
Westcott wrote:Do you mean -
commandArray['UpdateDevice'] = "108|0|"..temperature
crossed post - thanks! too much staring!
Pi + RFX433 + AEOTEC Gen5 ZWave + HGI80 + CM180i + sensors
SolarEdge Inverter and PVOutput
SolarEdge Inverter and PVOutput
Who is online
Users browsing this forum: No registered users and 1 guest