@@ -3258,6 +3258,7 @@ void SomfyShade::toJSON(JsonResponse &json) {
32583258 json.endArray ();
32593259}
32603260
3261+ /*
32613262bool SomfyShade::toJSON(JsonObject &obj) {
32623263 //Serial.print("Serializing Shade:");
32633264 //Serial.print(this->getShadeId());
@@ -3310,17 +3311,20 @@ bool SomfyShade::toJSON(JsonObject &obj) {
33103311 }
33113312 return true;
33123313}
3314+ */
33133315bool SomfyRoom::fromJSON (JsonObject &obj) {
33143316 if (obj.containsKey (" name" )) strlcpy (this ->name , obj[" name" ], sizeof (this ->name ));
33153317 if (obj.containsKey (" sortOrder" )) this ->sortOrder = obj[" sortOrder" ];
33163318 return true ;
33173319}
3320+ /*
33183321bool SomfyRoom::toJSON(JsonObject &obj) {
33193322 obj["roomId"] = this->roomId;
33203323 obj["name"] = this->name;
33213324 obj["sortOrder"] = this->sortOrder;
33223325 return true;
33233326}
3327+ */
33243328void SomfyRoom::toJSON (JsonResponse &json) {
33253329 json.addElem (" roomId" , this ->roomId );
33263330 json.addElem (" name" , this ->name );
@@ -3422,16 +3426,19 @@ bool SomfyGroup::toJSON(JsonObject &obj) {
34223426 return true;
34233427}
34243428*/
3429+
34253430void SomfyRemote::toJSON (JsonResponse &json) {
34263431 json.addElem (" remoteAddress" , (uint32_t )this ->getRemoteAddress ());
34273432 json.addElem (" lastRollingCode" , (uint32_t )this ->lastRollingCode );
34283433}
3434+ /*
34293435bool SomfyRemote::toJSON(JsonObject &obj) {
34303436 //obj["remotePrefId"] = this->getRemotePrefId();
34313437 obj["remoteAddress"] = this->getRemoteAddress();
34323438 obj["lastRollingCode"] = this->lastRollingCode;
34333439 return true;
34343440}
3441+ */
34353442void SomfyRemote::setRemoteAddress (uint32_t address) { this ->m_remoteAddress = address; snprintf (this ->m_remotePrefId , sizeof (this ->m_remotePrefId ), " _%lu" , (unsigned long )this ->m_remoteAddress ); }
34363443uint32_t SomfyRemote::getRemoteAddress () { return this ->m_remoteAddress ; }
34373444void SomfyShadeController::processFrame (somfy_frame_t &frame, bool internal) {
@@ -4571,13 +4578,14 @@ void Transceiver::toJSON(JsonResponse& json) {
45714578 this ->config .toJSON (json);
45724579 json.endObject ();
45734580}
4574-
4581+ /*
45754582bool Transceiver::toJSON(JsonObject& obj) {
45764583 //Serial.println("Setting Transceiver Json");
45774584 JsonObject objConfig = obj.createNestedObject("config");
45784585 this->config.toJSON(objConfig);
45794586 return true;
45804587}
4588+ */
45814589bool Transceiver::fromJSON (JsonObject& obj) {
45824590 if (obj.containsKey (" config" )) {
45834591 JsonObject objConfig = obj[" config" ];
@@ -4664,6 +4672,7 @@ void transceiver_config_t::toJSON(JsonResponse &json) {
46644672 json.addElem (" enabled" , this ->enabled );
46654673 json.addElem (" radioInit" , this ->radioInit );
46664674}
4675+ /*
46674676void transceiver_config_t::toJSON(JsonObject& obj) {
46684677 obj["type"] = this->type;
46694678 obj["TXPin"] = this->TXPin;
@@ -4677,36 +4686,35 @@ void transceiver_config_t::toJSON(JsonObject& obj) {
46774686 obj["deviation"] = this->deviation; // float
46784687 obj["txPower"] = this->txPower;
46794688 obj["proto"] = static_cast<uint8_t>(this->proto);
4680- /*
4681- obj["internalCCMode"] = this->internalCCMode;
4682- obj["modulationMode"] = this->modulationMode;
4683- obj["channel"] = this->channel;
4684- obj["channelSpacing"] = this->channelSpacing; // float
4685- obj["dataRate"] = this->dataRate; // float
4686- obj["syncMode"] = this->syncMode;
4687- obj["syncWordHigh"] = this->syncWordHigh;
4688- obj["syncWordLow"] = this->syncWordLow;
4689- obj["addrCheckMode"] = this->addrCheckMode;
4690- obj["checkAddr"] = this->checkAddr;
4691- obj["dataWhitening"] = this->dataWhitening;
4692- obj["pktFormat"] = this->pktFormat;
4693- obj["pktLengthMode"] = this->pktLengthMode;
4694- obj["pktLength"] = this->pktLength;
4695- obj["useCRC"] = this->useCRC;
4696- obj["autoFlushCRC"] = this->autoFlushCRC;
4697- obj["disableDCFilter"] = this->disableDCFilter;
4698- obj["enableManchester"] = this->enableManchester;
4699- obj["enableFEC"] = this->enableFEC;
4700- obj["minPreambleBytes"] = this->minPreambleBytes;
4701- obj["pqtThreshold"] = this->pqtThreshold;
4702- obj["appendStatus"] = this->appendStatus;
4703- obj["printBuffer"] = somfy.transceiver.printBuffer;
4704- */
4689+ //obj["internalCCMode"] = this->internalCCMode;
4690+ //obj["modulationMode"] = this->modulationMode;
4691+ //obj["channel"] = this->channel;
4692+ //obj["channelSpacing"] = this->channelSpacing; // float
4693+ //obj["dataRate"] = this->dataRate; // float
4694+ //obj["syncMode"] = this->syncMode;
4695+ //obj["syncWordHigh"] = this->syncWordHigh;
4696+ //obj["syncWordLow"] = this->syncWordLow;
4697+ //obj["addrCheckMode"] = this->addrCheckMode;
4698+ //obj["checkAddr"] = this->checkAddr;
4699+ //obj["dataWhitening"] = this->dataWhitening;
4700+ //obj["pktFormat"] = this->pktFormat;
4701+ //obj["pktLengthMode"] = this->pktLengthMode;
4702+ //obj["pktLength"] = this->pktLength;
4703+ //obj["useCRC"] = this->useCRC;
4704+ //obj["autoFlushCRC"] = this->autoFlushCRC;
4705+ //obj["disableDCFilter"] = this->disableDCFilter;
4706+ //obj["enableManchester"] = this->enableManchester;
4707+ //obj["enableFEC"] = this->enableFEC;
4708+ //obj["minPreambleBytes"] = this->minPreambleBytes;
4709+ //obj["pqtThreshold"] = this->pqtThreshold;
4710+ //obj["appendStatus"] = this->appendStatus;
4711+ //obj["printBuffer"] = somfy.transceiver.printBuffer;
47054712 obj["enabled"] = this->enabled;
47064713 obj["radioInit"] = this->radioInit;
47074714 //Serial.print("Serialize Radio JSON ");
47084715 //Serial.printf("SCK:%u MISO:%u MOSI:%u CSN:%u RX:%u TX:%u\n", this->SCKPin, this->MISOPin, this->MOSIPin, this->CSNPin, this->RXPin, this->TXPin);
47094716}
4717+ */
47104718void transceiver_config_t::save () {
47114719 pref.begin (" CC1101" );
47124720 pref.clear ();
0 commit comments