WiFi MQTT Control Relay Thermostat and Redis

Hy, everybody,

I’m trying to play with WiFi MQTT Control Relay Thermostat
(WiFi MQTT Control Relay Thermostat - Guide | OpenEnergyMonitor) and I don’t know how to fill
the Redis.

Python give me an error :
"Traceback (most recent call last):

  • File “cuns.py”, line 14, in *
  • heating[‘schedule’] = json.loads(r.get(“app/heating/schedule”))*
  • File “/usr/lib/python3.7/json/init.py”, line 341, in loads*
  • raise TypeError(f’the JSON object must be str, bytes or bytearray, '*
    TypeError: the JSON object must be str, bytes or bytearray, not NoneType
    because redis is empty.

someone can help me ?

nb:sorry for my poor english.

made many corrections in this old project, I’m hanging on.

Thanks @fr3d what are the corrections that you have made? Are you fixing issues with: ESP8266_Relay_Board/1ch_relay at master · openenergymonitor/ESP8266_Relay_Board · GitHub?

currently I’m not playing with esp8266,
I don’t have any linux system on pc. I’ve only got few raspberrys but I think they can’t get the xtensa i386 library

.So I’m trying to convert this project (development/experimental/control/open_thermostat_scheduler at master · emoncms/development · GitHub) into raspberry. I would like to add and choose differents room with mqtt T° sensors

For now I can’t find the json structure to fill redis schedule.

 *File "duns.py", line 14, in <module>*
*    heating['schedule'] = json.loads(r.get("app/heating/schedule"))*
*  File "/usr/lib/python3.7/json/__init__.py", line 348, in loads*
*    return _default_decoder.decode(s)*
*  File "/usr/lib/python3.7/json/decoder.py", line 337, in decode*
*    obj, end = self.raw_decode(s, idx=_w(s, 0).end())*
*  File "/usr/lib/python3.7/json/decoder.py", line 355, in raw_decode*
*    raise JSONDecodeError("Expecting value", s, err.value) from None*
*json.decoder.JSONDecodeError: Expecting value: line 1 column 2 (char 1)*